From bfbdeec714dc798eaa4bc398589efcf02be40138 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Thu, 27 Dec 2012 00:27:16 +0100 Subject: libmsc: Track and update the location update expiry Set the subscriber expiry timeout to twice the duration of the location update period and provide functions subscr_expire() and db_subscriber_expire() to mark subscribers offline that have missed two location update periods. This patch increases the DB revision to 3, so the hlr will be incompatible with prior versions. We should allow 0 for T3212 as well to disable the location update period. In that case we will need a way to indicate that in the database. --- openbsc/include/openbsc/gsm_subscriber.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openbsc/include/openbsc/gsm_subscriber.h') diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 6cf85731b..78f9710c5 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -38,6 +38,7 @@ struct gsm_subscriber { char name[GSM_NAME_LENGTH]; char extension[GSM_EXTENSION_LENGTH]; int authorized; + time_t expire_lu; /* Temporary field which is not stored in the DB/HLR */ uint32_t flags; @@ -98,6 +99,7 @@ char *subscr_name(struct gsm_subscriber *subscr); int subscr_purge_inactive(struct gsm_network *net); void subscr_update_from_db(struct gsm_subscriber *subscr); +void subscr_expire(struct gsm_network *net); /* internal */ struct gsm_subscriber *subscr_alloc(void); -- cgit v1.2.3