Change in osmo-msc[master]: msc_a CC: add some basic sanity tests

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 gerrit-no-reply at lists.osmocom.org
Thu Nov 28 01:46:41 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16303 )


Change subject: msc_a CC: add some basic sanity tests
......................................................................

msc_a CC: add some basic sanity tests

Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c
---
M src/libmsc/msc_a.c
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/03/16303/1

diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index a4048f4..bc5b7ea 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -518,6 +518,12 @@
 	struct gsm_trans *cc_trans = msc_a->cc.active_trans;
 	struct gsm0808_channel_type channel_type;
 
+	if (!cc_trans) {
+		LOG_MSC_A(msc_a, LOGL_ERROR, "No CC transaction active\n");
+		call_leg_release(msc_a->cc.call_leg);
+		return;
+	}
+
 	/* Once a CI is known, we could also CRCX the CN side of the MGW endpoint, but it makes sense to wait for the
 	 * codec to be determined by the Assignment Complete message, first. */
 
@@ -627,6 +633,10 @@
 			LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid data for %s\n", osmo_fsm_event_name(fi->fsm, event));
 			return;
 		}
+		if (!msc_a->cc.call_leg) {
+			LOG_MSC_A(msc_a, LOGL_ERROR, "No call leg active\n");
+			return;
+		}
 		if (!osmo_sockaddr_str_is_nonzero(&rtps->local)) {
 			LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid RTP address received from MGW: " OSMO_SOCKADDR_STR_FMT "\n",
 				 OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16303
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c
Gerrit-Change-Number: 16303
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191128/9eb03efe/attachment.htm>


More information about the gerrit-log mailing list