aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libiu
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/libiu
parent38137e84f738167fcb9f9031a1142af78d43a55f (diff)
WIP: Wait for radio bearer before sending pdp context accept
Diffstat (limited to 'openbsc/src/libiu')
-rw-r--r--openbsc/src/libiu/iu.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c
index f6c5ced14..1c1d7173c 100644
--- a/openbsc/src/libiu/iu.c
+++ b/openbsc/src/libiu/iu.c
@@ -85,18 +85,25 @@ int iu_rab_act_cs(struct ue_conn_ctx *ue_ctx, uint32_t rtp_ip, uint16_t rtp_port
{
struct msgb *msg;
+ /* FIXME: Generate unique RAB ID per UE */
msg = ranap_new_msg_rab_assign_voice(1, rtp_ip, rtp_port);
msg->l2h = msg->data;
return iu_rab_act(ue_ctx, msg);
}
-int iu_rab_act_ps(struct ue_conn_ctx *ue_ctx, uint32_t gtp_ip, uint32_t gtp_tei)
+int iu_rab_act_ps(struct sgsn_pdp_ctx *pdp, uint32_t gtp_ip, uint32_t gtp_tei)
{
struct msgb *msg;
+ struct sgsn_mm_ctx *mm = pdp->mm;
+ struct ue_conn_ctx *uectx;
+ uectx = mm->iu.ue_ctx;
+ uectx->pdp = pdp;
+
+ /* FIXME: Generate unique RAB ID per UE */
msg = ranap_new_msg_rab_assign_data(1, gtp_ip, gtp_tei);
msg->l2h = msg->data;
- return iu_rab_act(ue_ctx, msg);
+ return iu_rab_act(uectx, msg);
}
int gprs_iu_rab_deact(struct sgsn_mm_ctx *mm)
@@ -238,7 +245,9 @@ static int ranap_handle_co_iu_rel_req(struct ue_conn_ctx *ctx, RANAP_Iu_ReleaseR
return 0;
}
-static int ranap_handle_co_rab_ass_resp(void *ctx, RANAP_RAB_AssignmentResponseIEs_t *ies)
+int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx);
+
+static int ranap_handle_co_rab_ass_resp(struct ue_conn_ctx *ctx, RANAP_RAB_AssignmentResponseIEs_t *ies)
{
int rc;
@@ -260,6 +269,8 @@ static int ranap_handle_co_rab_ass_resp(void *ctx, RANAP_RAB_AssignmentResponseI
LOGPC(DRANAP, LOGL_INFO, "\n");
+ send_act_pdp_cont_acc(ctx->pdp);
+
return rc;
}