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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/12396 ) Change subject: cosmetics in msc_mgcp_call_release() ...................................................................... cosmetics in msc_mgcp_call_release() Use local variables instead of writing trans->conn-> all the time. Cosmetic preparation for I1f8746e7babfcd3028a4d2c0ba260c608c686c76 and I0ba216b737909e92080a722db26e3577726c63cb/ Change-Id: I99717b3b72a9d7cbc95455ea25b2018ec1755308 --- M src/libmsc/msc_mgcp.c 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c index 71f36b3..6170c10 100644 --- a/src/libmsc/msc_mgcp.c +++ b/src/libmsc/msc_mgcp.c @@ -1143,26 +1143,29 @@ int msc_mgcp_call_release(struct gsm_trans *trans) { struct mgcp_ctx *mgcp_ctx; + struct ran_conn *conn = trans->conn; OSMO_ASSERT(trans); - if (!trans->conn) { + if (!conn) { LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid conn, call release failed\n", vlr_subscr_name(trans->vsub)); return -EINVAL; } - if (!trans->conn->rtp.mgcp_ctx) { + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) { LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) invalid mgcp context, call release failed.\n", vlr_subscr_name(trans->vsub)); return -EINVAL; } - if (!trans->conn->rtp.mgcp_ctx->fsm) { + if (!mgcp_ctx->fsm) { LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) no FSM, call release failed\n", vlr_subscr_name(trans->vsub)); return -EINVAL; } - mgcp_ctx = trans->conn->rtp.mgcp_ctx; + LOGP(DMGCP, LOGL_DEBUG, "(ti %02x %s) Call release: tearing down MGW endpoint\n", + trans->transaction_id, vlr_subscr_name(trans->vsub)); /* Inform the FSM that as soon as it reaches ST_HALT it may free * all context information immediately */ @@ -1176,10 +1179,7 @@ * overwriting the context pointer with NULL. The FSM will now * take care for a graceful shutdown and when done it will free * all related context information */ - trans->conn->rtp.mgcp_ctx = NULL; - - LOGP(DMGCP, LOGL_DEBUG, "(subscriber:%s) call release initiated\n", - vlr_subscr_name(trans->vsub)); + conn->rtp.mgcp_ctx = NULL; return 0; } -- To view, visit https://gerrit.osmocom.org/12396 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I99717b3b72a9d7cbc95455ea25b2018ec1755308 Gerrit-Change-Number: 12396 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190103/a13682d1/attachment.htm>