pespin submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified
hnbap: Make hnbgw_tx_ue_register_acc_tmsi() signature similar to hnbgw_tx_ue_register_acc()

Make those functions look more similar by calling them with
get_next_ue_ctx_id() as param in hnbgw_rx_ue_register_req().

Change-Id: I9ce01babda7cb7e415cb7514c26f10a1773166fa
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index 99a27f5..5874457 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -341,7 +341,7 @@
return hnbgw_hnbap_tx(hnb, msg);
}

-static int hnbgw_tx_ue_register_acc_tmsi(struct hnb_context *hnb, HNBAP_UE_Identity_t *ue_id)
+static int hnbgw_tx_ue_register_acc_tmsi(struct hnb_context *hnb, HNBAP_UE_Identity_t *ue_id, uint32_t context_id)
{
HNBAP_UERegisterAccept_t accept_out;
HNBAP_UERegisterAcceptIEs_t accept;
@@ -393,7 +393,7 @@
tmsi = ntohl(tmsi);
LOGHNB(hnb, DHNBAP, LOGL_DEBUG, "HNBAP register with TMSI %x\n", tmsi);

- asn1_u24_to_bitstring(&accept.context_ID, &ctx_id, get_next_ue_ctx_id());
+ asn1_u24_to_bitstring(&accept.context_ID, &ctx_id, context_id);

memset(&accept_out, 0, sizeof(accept_out));
rc = hnbap_encode_ueregisteraccepties(&accept_out, &accept);
@@ -616,7 +616,7 @@
case HNBAP_UE_Identity_PR_tMSILAI:
case HNBAP_UE_Identity_PR_pTMSIRAI:
if (g_hnbgw->config.hnbap_allow_tmsi) {
- rc = hnbgw_tx_ue_register_acc_tmsi(ctx, &ies.uE_Identity);
+ rc = hnbgw_tx_ue_register_acc_tmsi(ctx, &ies.uE_Identity, get_next_ue_ctx_id());
} else {
cause.present = HNBAP_Cause_PR_radioNetwork;
cause.choice.radioNetwork = HNBAP_CauseRadioNetwork_invalid_UE_identity;

To view, visit change 39979. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I9ce01babda7cb7e415cb7514c26f10a1773166fa
Gerrit-Change-Number: 39979
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>