gprs: Always reset auth tuples/pdp infos in gprs_gsup_decode

Currently auth tuples are always appended to the lists when
gprs_gsup_decode is called with a gsup_msg structure. This makes a
test case fail, where the same gsup_msg is used again and again
without clearing it after each use.
Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-01-12 13:39:15 +01:00 committed by Holger Hans Peter Freyther
parent 424ffa4806
commit a2315eebf9
1 changed files with 3 additions and 0 deletions

View File

@ -198,6 +198,9 @@ int gprs_gsup_decode(const uint8_t *const_data, size_t data_len,
gsm48_decode_bcd_number(gsup_msg->imsi, sizeof(gsup_msg->imsi),
value - 1, 0);
gsup_msg->num_pdp_infos = 0;
gsup_msg->num_auth_tuples = 0;
/* specific parts */
while (data_len > 0) {
enum gprs_gsup_iei iei;