aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_hnbap.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-01-06 18:08:21 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2016-01-07 11:01:15 +0100
commitb433b97474a28143b3e4a57d3684c1dbea71375d (patch)
treee91e68a2310f5c24e2c2af12ea277e2ec5f764bb /src/hnbgw_hnbap.c
parent1ee089f37a6c7be98c92cb4f37675eeb1a4444aa (diff)
hnbgw_hnbap: Handle hnb deregister message as well
Diffstat (limited to 'src/hnbgw_hnbap.c')
-rw-r--r--src/hnbgw_hnbap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 6bc09d9..eda5139 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -114,6 +114,23 @@ static int hnbgw_tx_ue_register_acc(struct ue_context *ue)
return hnbgw_hnbap_tx(ue->hnb, msg);
}
+static int hnbgw_rx_hnb_deregister(struct hnb_context *ctx, ANY_t *in)
+{
+ HNBDe_RegisterIEs_t ies;
+ int rc;
+
+ rc = hnbap_decode_hnbde_registeries(&ies, in);
+ if (rc < 0)
+ return rc;
+
+ DEBUGP(DHNBAP, "HNB-DE-REGSITER cause=%ld\n",
+ ies.cause);
+
+ hnb_context_release(ctx);
+
+ return 0;
+}
+
static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in)
{
HNBRegisterRequestIEs_t ies;
@@ -226,6 +243,7 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t
rc = hnbgw_rx_hnb_register_req(hnb, &imsg->value);
break;
case ProcedureCode_id_HNBDe_Register: /* 8.3 */
+ rc = hnbgw_rx_hnb_deregister(hnb, &imsg->value);
break;
case ProcedureCode_id_UERegister: /* 8.4 */
rc = hnbgw_rx_ue_register_req(hnb, &imsg->value);