path: root/src/libmsc/subscr_conn.c
diff options
authorNeels Hofmeyr <neels@hofmeyr.de>2017-11-18 23:25:41 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-11-20 13:49:32 +0000
commit3ddd7422ea50864bf14c3475f5305e1aef899ceb (patch)
tree9508658dd292d916dfa32a6aefaa3be6f77f021e /src/libmsc/subscr_conn.c
parentb3fa355321de7e0b4f3b83afebba203aa579a7d4 (diff)
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
Diffstat (limited to 'src/libmsc/subscr_conn.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c
index 336637cee..62b76195a 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/subscr_conn.c
@@ -233,7 +233,8 @@ int subscr_conn_fsm_timeout(struct osmo_fsm_inst *fi)
struct gsm_subscriber_connection *conn = fi->priv;
if (conn)
- 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;