diff mbox

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

Message ID 1432889991-12614-1-git-send-email-kluchnikovi@gmail.com
State Accepted
Headers show

Commit Message

Ivan Kluchnikov May 29, 2015, 8:59 a.m. UTC
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 mbox

Patch

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