Change in osmo-msc[master]: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_pa...

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue May 14 15:26:43 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14045 )

Change subject: libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging()
......................................................................

libmsc/ran_peer.c: avoid unreasonable use of goto in ran_peer_down_paging()

Change-Id: I3320240d8f1dc318e516162bb32e01ddafc7e30e
---
M src/libmsc/ran_peer.c
1 file changed, 2 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c
index a77cb89..40e26a2 100644
--- a/src/libmsc/ran_peer.c
+++ b/src/libmsc/ran_peer.c
@@ -640,15 +640,11 @@
 {
 	struct msgb *l2;
 
-	if (cell_id_list_find(&rp->cells_seen, page_id, 0, false))
-		goto page_it;
-
 	/* There are also the RAN peers that are configured in the neighbor ident for Handover, but if those aren't
 	 * connected, then we can't Page there. */
+	if (!cell_id_list_find(&rp->cells_seen, page_id, 0, false))
+		return 0;
 
-	return 0;
-
-page_it:
 	LOG_RAN_PEER_CAT(rp, DPAG, LOGL_DEBUG, "Paging for %s on %s\n", vlr_subscr_name(vsub),
 			 gsm0808_cell_id_name(page_id));
 	l2 = rp->sri->ran->sccp_ran_ops.make_paging_msg(rp->sri, page_id, vsub->imsi, vsub->tmsi, cause);

-- 
To view, visit https://gerrit.osmocom.org/14045
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: I3320240d8f1dc318e516162bb32e01ddafc7e30e
Gerrit-Change-Number: 14045
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190514/02b14fd6/attachment.htm>


More information about the gerrit-log mailing list