diff options
Diffstat (limited to 'src/libmsc/subscr_conn.c')
-rw-r--r-- | src/libmsc/subscr_conn.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c index 1b3b24042..c1d0e11a5 100644 --- a/src/libmsc/subscr_conn.c +++ b/src/libmsc/subscr_conn.c @@ -202,6 +202,15 @@ static bool subscr_conn_fsm_has_active_transactions(struct osmo_fsm_inst *fi) static void subscr_conn_fsm_accepted_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) { + struct gsm_subscriber_connection *conn = fi->priv; + + /* Stop Location Update expiry for this subscriber. While the subscriber + * has an open connection the LU expiry timer must remain disabled. + * Otherwise we would kick the subscriber off the network when the timer + * expires e.g. during a long phone call. + * The LU expiry timer will restart once the connection is closed. */ + conn->vsub->expire_lu = VLR_SUBSCRIBER_NO_EXPIRATION; + if (!subscr_conn_fsm_has_active_transactions(fi)) osmo_fsm_inst_dispatch(fi, SUBSCR_CONN_E_UNUSED, NULL); } @@ -278,6 +287,12 @@ static void subscr_conn_fsm_releasing_onenter(struct osmo_fsm_inst *fi, uint32_t /* Cancel all VLR FSMs, if any */ vlr_subscr_cancel_attach_fsm(conn->vsub, OSMO_FSM_TERM_ERROR, GSM48_REJECT_CONGESTION); + if (conn->vsub) { + /* The subscriber has no active connection anymore. + * Restart the periodic Location Update expiry timer for this subscriber. */ + vlr_subscr_enable_expire_lu(conn->vsub); + } + /* If we're closing in a middle of a trans, we need to clean up */ trans_conn_closed(conn); |