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:
parent
424ffa4806
commit
a2315eebf9
|
@ -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),
|
gsm48_decode_bcd_number(gsup_msg->imsi, sizeof(gsup_msg->imsi),
|
||||||
value - 1, 0);
|
value - 1, 0);
|
||||||
|
|
||||||
|
gsup_msg->num_pdp_infos = 0;
|
||||||
|
gsup_msg->num_auth_tuples = 0;
|
||||||
|
|
||||||
/* specific parts */
|
/* specific parts */
|
||||||
while (data_len > 0) {
|
while (data_len > 0) {
|
||||||
enum gprs_gsup_iei iei;
|
enum gprs_gsup_iei iei;
|
||||||
|
|
Loading…
Reference in New Issue