[MERGED] osmo-msc[master]: subscr_conn: don't close after conn timeout

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.org
Mon Nov 20 13:49:33 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: subscr_conn: don't close after conn timeout
......................................................................


subscr_conn: don't close after conn timeout

If dispatching a conn timeout, the conn fsm will already have been discarded,
and we cannot fire any more events to it.

The expected test output changes illustrate that we are now omitting event
dispatches that happen *after* the same FSM was already deallocated.

Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457
---
M src/libmsc/subscr_conn.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
3 files changed, 2 insertions(+), 9 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c
index 336637c..62b7619 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/subscr_conn.c
@@ -233,7 +233,8 @@
 	struct gsm_subscriber_connection *conn = fi->priv;
 	if (conn)
 		vlr_subscr_conn_timeout(conn->vsub);
-	osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_CN_CLOSE, NULL);
+	else
+		osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_CN_CLOSE, NULL);
 	return 0;
 }
 
diff --git a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err
index e34490d..4caaf1e 100644
--- a/tests/msc_vlr/msc_vlr_test_hlr_timeout.err
+++ b/tests/msc_vlr/msc_vlr_test_hlr_timeout.err
@@ -71,8 +71,6 @@
 DREF freeing VLR subscr IMSI:901700000004620
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted
 - SUBSCR_CONN_TIMEOUT has passed, conn is gone.
   bssap_clear_sent == 1
   llist_count(&net->subscr_conns) == 0
@@ -173,8 +171,6 @@
 DREF freeing VLR subscr MSISDN:46071
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted
 - SUBSCR_CONN_TIMEOUT has passed, conn is gone.
   bssap_clear_sent == 1
   llist_count(&net->subscr_conns) == 0
diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err
index e267c5b..47af359 100644
--- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err
+++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err
@@ -91,8 +91,6 @@
 DREF freeing VLR subscr IMSI:901700000004620
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted
 - SUBSCR_CONN_TIMEOUT has passed, conn is gone.
   bssap_clear_sent == 1
   llist_count(&net->subscr_conns) == 0
@@ -325,8 +323,6 @@
 DREF VLR subscr MSISDN:46071 usage decreases to: 1
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance
 DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Received Event SUBSCR_CONN_E_CN_CLOSE
-DMM Subscr_Conn(901700000004620){SUBSCR_CONN_S_RELEASED}: Event SUBSCR_CONN_E_CN_CLOSE not permitted
 - SUBSCR_CONN_TIMEOUT has passed, conn is gone.
   bssap_clear_sent == 1
   llist_count(&net->subscr_conns) == 0

-- 
To view, visit https://gerrit.osmocom.org/4925
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I25af3e5a1b04e3a5c9f41956cbcbbdd8439c6457
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list