aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_hnbap.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-09-11 00:15:16 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-11 00:15:54 +0200
commitb534e5c0851647c4d50fd013fbd5a344a60c414f (patch)
tree5d7f8f56b02bc5d429109aec8a930b8870031c1e /src/hnbgw_hnbap.c
parente2e5d4dd53749549e058335e69014f5b85d8cc7f (diff)
introduce ue_context management
We keep one 'ue_context' structure for every UE that we see a UE REGISTER REQUEST for.
Diffstat (limited to 'src/hnbgw_hnbap.c')
-rw-r--r--src/hnbgw_hnbap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index cdd4895..d00d59e 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -23,6 +23,7 @@ static int hnbgw_hnbap_tx(struct hnb_context *ctx, struct msgb *msg)
return osmo_wqueue_enqueue(&ctx->wqueue, msg);
}
+
static int hnbgw_tx_hnb_register_acc(struct hnb_context *ctx)
{
HNBRegisterAccept_t accept_out;
@@ -110,11 +111,14 @@ static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in)
if (rc < 0)
return rc;
+ /* FIXME: convert UE identity into a more palatable format */
+ ue = ue_context_by_imsi("123");
+ if (!ue)
+ ue = ue_context_alloc(ctx, "123");
+
DEBUGP(DMAIN, "UE-REGSITER-REQ ID_type=%d cause=%ld\n",
ies.uE_Identity.present, ies.registration_Cause);
- /* FIXME: convert UE identity into a more palatable format */
-
/* Send UERegisterAccept */
return hnbgw_tx_ue_register_acc(ue);
}