Fix encoding of BSSGP_IE_NUM_OCT_AFF in bssgp_tx_llc_discarded()

This is a 24bit integer value, and thus we need to encode the three
least significant octets of the network-byte-order 32bit value, not the
three most significant octets.
jolly/7bit_ussd
Andreas Eversberg 11 years ago committed by Harald Welte
parent 007a71e332
commit aa5d0e8894
  1. 2
      src/gb/gprs_bssgp_bss.c

@ -230,7 +230,7 @@ int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli,
msgb_tvlv_put(msg, BSSGP_IE_LLC_FRAMES_DISCARDED, 1, &num_frames);
msgb_tvlv_put(msg, BSSGP_IE_BVCI, 2, (uint8_t *) &_bvci);
msgb_tvlv_put(msg, BSSGP_IE_NUM_OCT_AFF, 3, (uint8_t *) &_oct_aff);
msgb_tvlv_put(msg, BSSGP_IE_NUM_OCT_AFF, 3, ((uint8_t *) &_oct_aff) + 1);
return gprs_ns_sendmsg(bssgp_nsi, msg);
}

Loading…
Cancel
Save