summaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_libgtp.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-02-15 11:55:47 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:10 +0100
commitd6d0d8b86fb16fd5a8d6090d26b6b7848a8281ce (patch)
treed7dada9ebc7ca97f66878891091494f9003e32b4 /openbsc/src/gprs/sgsn_libgtp.c
parent38137e84f738167fcb9f9031a1142af78d43a55f (diff)
WIP: Wait for radio bearer before sending pdp context accept
Diffstat (limited to 'openbsc/src/gprs/sgsn_libgtp.c')
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c
index b84d4ba40..4b98fbbcc 100644
--- a/openbsc/src/gprs/sgsn_libgtp.c
+++ b/openbsc/src/gprs/sgsn_libgtp.c
@@ -91,7 +91,7 @@ const struct value_string gtp_cause_strs[] = {
{ 0, NULL }
};
-int gprs_iu_rab_act(struct sgsn_mm_ctx *mm, uint32_t gtp_ip, uint32_t gtp_tei);
+int gprs_iu_rab_act(struct sgsn_pdp_ctx *mm, uint32_t gtp_ip, uint32_t gtp_tei);
/* Generate the GTP IMSI IE according to 09.60 Section 7.9.2 */
static uint64_t imsi_str2gtp(char *str)
@@ -352,20 +352,16 @@ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause)
if (pctx->mm->ran_type == MM_CTX_T_GERAN_Gb) {
/* Activate the SNDCP layer */
sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi);
+
+
+ return send_act_pdp_cont_acc(pctx);
} else {
/* Activate a radio bearer */
uint32_t ggsn_ip = 0xc0a80033; /* 192.168.0.51 */
- iu_rab_act_ps(pctx->mm->iu.ue_ctx, ggsn_ip, pdp->teid_own);
+ iu_rab_act_ps(pctx, ggsn_ip, pdp->teid_own);
+ return 0;
}
- /* Inform others about it */
- memset(&sig_data, 0, sizeof(sig_data));
- sig_data.pdp = pctx;
- osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_ACT, &sig_data);
-
- /* Send PDP CTX ACT to MS */
- return gsm48_tx_gsm_act_pdp_acc(pctx);
-
reject:
/*
* In case of a timeout pdp will be NULL but we have a valid pointer
@@ -387,6 +383,19 @@ reject:
return EOF;
}
+int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx)
+{
+ struct sgsn_signal_data sig_data;
+
+ /* Inform others about it */
+ memset(&sig_data, 0, sizeof(sig_data));
+ sig_data.pdp = pctx;
+ osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_ACT, &sig_data);
+
+ /* Send PDP CTX ACT to MS */
+ return gsm48_tx_gsm_act_pdp_acc(pctx);
+}
+
/* Confirmation of a PDP Context Delete */
static int delete_pdp_conf(struct pdp_t *pdp, void *cbp, int cause)
{