aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-30 15:03:18 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-23 22:27:36 +0100
commit7beb6abd0f8477c569e552e04c15f991a2eebb58 (patch)
tree630bd4978ce86a7a36963c1ef7399d6c0edea16f /openbsc/src/libmsc
parent9ba35214e4131f76084d8f019719b4fbfeb0d7f6 (diff)
move t3212 to network level (periodic lu)
Set the T3212 default value in struct gsm_network and take that value when creating a BTS. Adjust VTY accordingly. Change-Id: Ifb730f9d0106fe195adc30459a39290a07313b50
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index 568f1c5d0..9bea0e7a6 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -275,16 +275,12 @@ struct gsm_subscriber *subscr_get_by_id(struct gsm_subscriber_group *sgrp,
int subscr_update_expire_lu(struct gsm_subscriber *s, struct gsm_bts *bts)
{
int rc;
+ struct gsm_network *network = s->group->net;
if (!s) {
LOGP(DMM, LOGL_ERROR, "LU Expiration but NULL subscriber\n");
return -1;
}
- if (!bts) {
- LOGP(DMM, LOGL_ERROR, "%s: LU Expiration but NULL bts\n",
- subscr_name(s));
- return -1;
- }
/* Table 10.5.33: The T3212 timeout value field is coded as the
* binary representation of the timeout value for
@@ -293,11 +289,10 @@ int subscr_update_expire_lu(struct gsm_subscriber *s, struct gsm_bts *bts)
* Timeout is twice the t3212 value plus one minute */
/* Is expiration handling enabled? */
- if (bts->si_common.chan_desc.t3212 == 0)
+ if (network->t3212 == 0)
s->expire_lu = GSM_SUBSCRIBER_NO_EXPIRATION;
else
- s->expire_lu = time(NULL) +
- (bts->si_common.chan_desc.t3212 * 60 * 6 * 2) + 60;
+ s->expire_lu = time(NULL) + (network->t3212 * 60 * 6 * 2) + 60;
rc = db_sync_subscriber(s);
db_subscriber_update(s);