This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15480 Change subject: gprs_ranap: refactor REQUIRE_MM define ...................................................................... gprs_ranap: refactor REQUIRE_MM define All branches need a MM context. Exit early if no MM context present. Change-Id: Ifa4c55f1f2c199fa63bd755311026b8586a65f3f --- M src/sgsn/gprs_ranap.c 1 file changed, 6 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/80/15480/1 diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index 27b9641..acd9eb6 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -120,31 +120,24 @@ int rc = -1; mm = sgsn_mm_ctx_by_ue_ctx(ctx); - -#define REQUIRE_MM \ - if (!mm) { \ - LOGIUP(ctx, LOGL_NOTICE, "Cannot find mm ctx for IU event %d\n", type); \ - return rc; \ + if (!mm) { + LOGIUP(ctx, LOGL_NOTICE, "Cannot find mm ctx for IU event %d\n", type); + return rc; } switch (type) { case RANAP_IU_EVENT_RAB_ASSIGN: - REQUIRE_MM rc = sgsn_ranap_rab_ass_resp(mm, (RANAP_RAB_SetupOrModifiedItemIEs_t *)data); break; case RANAP_IU_EVENT_IU_RELEASE: /* fall thru */ case RANAP_IU_EVENT_LINK_INVALIDATED: /* Clean up ranap_ue_conn_ctx here */ - if (mm) { - LOGMMCTXP(LOGL_INFO, mm, "IU release for imsi %s\n", mm->imsi); - osmo_fsm_inst_dispatch(mm->iu.mm_state_fsm, E_PMM_PS_CONN_RELEASE, NULL); - } else - LOGIUP(ctx, LOGL_INFO, "IU release\n"); + LOGMMCTXP(LOGL_INFO, mm, "IU release for imsi %s\n", mm->imsi); + osmo_fsm_inst_dispatch(mm->iu.mm_state_fsm, E_PMM_PS_CONN_RELEASE, NULL); rc = 0; break; case RANAP_IU_EVENT_SECURITY_MODE_COMPLETE: - REQUIRE_MM /* Continue authentication here */ mm->iu.ue_ctx->integrity_active = 1; @@ -155,10 +148,7 @@ osmo_fsm_inst_dispatch(mm->gmm_att_req.fsm, E_IU_SECURITY_CMD_COMPLETE, NULL); break; default: - if (mm) - LOGMMCTXP(LOGL_NOTICE, mm, "Unknown event received: %i\n", type); - else - LOGIUP(ctx, LOGL_NOTICE, "Unknown event received: %i\n", type); + LOGMMCTXP(LOGL_NOTICE, mm, "Unknown event received: %i\n", type); rc = -1; break; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15480 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ifa4c55f1f2c199fa63bd755311026b8586a65f3f Gerrit-Change-Number: 15480 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190911/530b4b27/attachment.htm>