aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gprs/gprs_sgsn.c3
-rw-r--r--openbsc/tests/sgsn/sgsn_test.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index 5fe4e616e..ad90d3c16 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -638,8 +638,7 @@ struct sgsn_ggsn_ctx *sgsn_mm_ctx_find_ggsn_ctx(struct sgsn_mm_ctx *mmctx,
req_apn_str[0] = 0;
}
- if (mmctx->subscr == NULL ||
- llist_empty(&mmctx->subscr->sgsn_data->pdp_list))
+ if (mmctx->subscr == NULL)
allow_any_apn = 1;
if (strlen(req_apn_str) == 0 && !allow_any_apn) {
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 =