diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-06-19 03:13:40 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-06-19 14:36:28 +0700 |
commit | 718f32fa88de1bf2643097147aaac3c35c29b6b1 (patch) | |
tree | 1db1d3eb1f0250a7f570093892156fd8593fde4f | |
parent | 188dd5f4dfa927b099144bf76fa4457e1938cf36 (diff) |
libvlr/vlr.c: do not expire subscribers if periodic LU is disabled
When periodic Location Update is disabled (T3212 = 0), it was noticed
that OsmoMSC does expire subscribers quite soon - after 60 seconds
(VLR_SUBSCRIBER_LU_EXPIRATION_INTERVAL) since the last LU.
In order to avoid that, we need to check T3212 timer value in
vlr_subscr_expire_lu(), and if it's equal to 0, do not expire
anybody until the explicit IMSI Detach.
Change-Id: I2ead2241a3394dbdd5417f4554190df3fd698af2
-rw-r--r-- | src/libvlr/vlr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 5610cfb53..625b69983 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -519,8 +519,15 @@ void vlr_subscr_expire_lu(void *data) { struct vlr_instance *vlr = data; struct vlr_subscr *vsub, *vsub_tmp; + struct gsm_network *net; struct timespec now; + /* Periodic location update might be disabled from the VTY, + * so we shall not expire subscribers until explicit IMSI Detach. */ + net = vlr->user_ctx; /* XXX move t3212 into struct vlr_instance? */ + if (!net->t3212) + goto done; + if (llist_empty(&vlr->subscribers)) goto done; |