rds: implement more robust PS/RT parsing
commitf7b2e3153b8ee1ca925da9ff99df863987bb2ec1
authorAmaury Pouly <amaury.pouly@gmail.com>
Thu, 10 May 2012 16:57:13 +0000 (10 18:57 +0200)
committerAmaury Pouly <amaury.pouly@gmail.com>
Thu, 31 May 2012 17:04:38 +0000 (31 19:04 +0200)
tree13e498a431abe2ba7c6b9cc4bfb10a6e3f27ea85
parentcc59ea453d0a1a53808bbe967d4dbfb2f670cb75
rds: implement more robust PS/RT parsing

Our current PS and RT parser is very strict: it requires
all segments to be received in order. This is too strong
of an assumption even when the reception in good, particularly
for long RT messages. This parser handles segments in any order
and completes a message only when all segments are present. To
avoid keeping obsolete segments, each segment has an associated
timeout and is trashed if not updated for a certain period.

Change-Id: I79841bb5ab1f838c7702d8281044e226f6510199
Reviewed-on: http://gerrit.rockbox.org/237
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
firmware/drivers/rds.c