[PATCH] gsm_04_08: Use osmo_assert for transt->conn and conn only in case of paging succeeded

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/OpenBSC@lists.osmocom.org/.

Ivan Kluchnikov kluchnikovi at gmail.com
Fri May 29 08:59:51 UTC 2015


setup_trig_pag_evt function can receive parameter conn = NULL, if T3113 expires.
---
 openbsc/src/libmsc/gsm_04_08.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 5609602..29ab2ba 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1390,12 +1390,12 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event,
 	struct gsm_trans *transt = _transt;
 
 	OSMO_ASSERT(!transt->conn);
-	OSMO_ASSERT(conn);
 
 	/* check all tranactions (without lchan) for subscriber */
 	switch (event) {
 	case GSM_PAGING_SUCCEEDED:
 		DEBUGP(DCC, "Paging subscr %s succeeded!\n", transt->subscr->extension);
+		OSMO_ASSERT(conn);
 		/* Assign lchan */
 		transt->conn = conn;
 		/* send SETUP request to called party */
-- 
1.7.9.5




More information about the OpenBSC mailing list