From b433b97474a28143b3e4a57d3684c1dbea71375d Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Wed, 6 Jan 2016 18:08:21 +0100 Subject: hnbgw_hnbap: Handle hnb deregister message as well --- src/hnbgw_hnbap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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); -- cgit v1.2.3