aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/sgsn/sgsn_test.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-24 20:51:17 +0800
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-25 14:38:01 +0800
commit9270d99f3db58e70d50ad45644b039b3fa314574 (patch)
tree216aa1390b7c0668df1126bed86536430aeefa6a /openbsc/tests/sgsn/sgsn_test.c
parent5e4b88cbb2d754d691a858a3ff99bcdc7ed9c7ce (diff)
sgsn: If there is a subscr don't allow an empty list
This is a left-over from the initial system where no PDP was provided by the system. For now if there is a subscr attached and no PDP context provisioned. He is not allowed to have a data connection. Update the testcase to create the pdp list entry more early with a wildcard and then change it to a specific match.
Diffstat (limited to 'openbsc/tests/sgsn/sgsn_test.c')
-rw-r--r--openbsc/tests/sgsn/sgsn_test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c
index a06c1532a..64570038e 100644
--- a/openbsc/tests/sgsn/sgsn_test.c
+++ b/openbsc/tests/sgsn/sgsn_test.c
@@ -1871,6 +1871,11 @@ static void test_ggsn_selection(void)
actxs[2] = sgsn_apn_ctx_find_alloc("*", "456789");
actxs[2]->ggsn = ggcs[2];
+ pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data);
+ pdp_data->context_id = 1;
+ pdp_data->pdp_type = 0x0121;
+ strncpy(pdp_data->apn_str, "*", sizeof(pdp_data->apn_str)-1);
+
/* Resolve GGSNs */
tp.lv[GSM48_IE_GSM_APN].len =
@@ -1917,10 +1922,6 @@ static void test_ggsn_selection(void)
/* Add PDP data entry to subscriber */
- pdp_data = sgsn_subscriber_pdp_data_alloc(s1->sgsn_data);
- pdp_data->context_id = 1;
-
- pdp_data->pdp_type = 0x0121;
strncpy(pdp_data->apn_str, "Test.Apn", sizeof(pdp_data->apn_str)-1);
tp.lv[GSM48_IE_GSM_APN].len =