diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-01-06 07:49:58 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-01-07 15:48:28 +0100 |
commit | caa14869c08b55d55168d29f5f6e3c23a22c833c (patch) | |
tree | 4132892ee095d25aa9d18960a6b96a8035a19b27 /openbsc | |
parent | 4cffc45cbc6e0945845ee57ebe14e31eecc423a0 (diff) |
[rest_octets] Return bv.data_len to indicate how was written
Return the used data_len for the bitvector. This indicates
how much data might have been written.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/rest_octets.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openbsc/src/rest_octets.c b/openbsc/src/rest_octets.c index 6c8c40314..74874bd9a 100644 --- a/openbsc/src/rest_octets.c +++ b/openbsc/src/rest_octets.c @@ -46,7 +46,7 @@ int rest_octets_si1(u_int8_t *data, u_int8_t *nch_pos) bitvec_set_bit(&bv, L); bitvec_spare_padding(&bv, 7); - return 0; + return bv.data_len; } /* Append selection parameters to bitvec */ @@ -125,7 +125,8 @@ int rest_octets_si3(u_int8_t *data, const struct gsm48_si_ro_info *si3) /* GPRS Indicator */ append_gprs_ind(&bv, &si3->gprs_ind); - return bitvec_spare_padding(&bv, (bv.data_len*8)-1); + bitvec_spare_padding(&bv, (bv.data_len*8)-1); + return bv.data_len; } static int append_lsa_params(struct bitvec *bv, @@ -178,7 +179,7 @@ int rest_octets_si4(u_int8_t *data, const struct gsm48_si_ro_info *si4) bitvec_set_bit(&bv, si4->break_ind ? H : L); } - return 0; + return bv.data_len; } /* GPRS Mobile Allocation as per TS 04.60 Chapter 12.10a: @@ -390,5 +391,6 @@ int rest_octets_si13(u_int8_t *data, const struct gsm48_si13_info *si13) } } } - return bitvec_spare_padding(&bv, (bv.data_len*8)-1); + bitvec_spare_padding(&bv, (bv.data_len*8)-1); + return bv.data_len; } |