summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-12 13:39:15 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 13:17:09 +0100
commita2315eebf972412e122033ac036dd21bcdad5335 (patch)
tree7600f5ec46e6e4a0ba3db60fee2d1a1c43551769 /openbsc
parent424ffa480630a4242d2a6f6b27b9e6b1ec08d206 (diff)
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
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gprs/gprs_gsup_messages.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gsup_messages.c b/openbsc/src/gprs/gprs_gsup_messages.c
index 02e14e794..aa3d55e0b 100644
--- a/openbsc/src/gprs/gprs_gsup_messages.c
+++ b/openbsc/src/gprs/gprs_gsup_messages.c
@@ -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;