rrlp-ephemeris: Properly implement pseudo segmentation flag

See 3GPP TS 44.031 section 2.2/2.3 for a example/description.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2009-12-28 00:04:56 +01:00 committed by Harald Welte
parent 90e46f5055
commit d316444e1b
1 changed files with 8 additions and 0 deletions

8
rrlp.c
View File

@ -575,6 +575,14 @@ rrlp_gps_assist_pdus(
/* Serialize & Release all PDUs */
for (i=0; i<lst_cnt && i<o_max_pdus; i++) {
/* Pseudo segmentation flags */
MoreAssDataToBeSent_t *mad = calloc(1, sizeof(*mad));
*mad = (i == (lst_cnt-1)) ?
MoreAssDataToBeSent_noMoreMessages :
MoreAssDataToBeSent_moreMessagesOnTheWay;
lst_pdu[i]->component.choice.assistanceData.moreAssDataToBeSent = mad;
/* Serialization */
// asn_fprint(stdout, &asn_DEF_PDU, lst_pdu[i]);
rv = uper_encode_to_new_buffer(&asn_DEF_PDU, NULL, lst_pdu[i], &o_pdu[i]);
if (rv < 0)