summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2009-06-02 02:54:38 +0000
committerHolger Freyther <zecke@selfish.org>2009-06-02 02:54:38 +0000
commit6d5200b217e42f084810736a6a18bdc4ff76898e (patch)
treebe1993250ddadf758a433f45dcff592858a22eaa /src
parent3770b763bc5087a5f2ac63ee19fe2348fb72ee81 (diff)
[subscriber] Update the lac entry in subscr_update (by Andreas Eversberg)
This is coming from patch 16 and is one of the two changes. When invoking subscr_update update the lac entry as well.
Diffstat (limited to 'src')
-rw-r--r--src/gsm_subscriber.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gsm_subscriber.c b/src/gsm_subscriber.c
index 0c2dd7c52..67aa7936b 100644
--- a/src/gsm_subscriber.c
+++ b/src/gsm_subscriber.c
@@ -96,11 +96,17 @@ int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason)
switch (reason) {
case GSM_SUBSCRIBER_UPDATE_ATTACHED:
s->current_bts = bts;
+ /* Indicate "attached to LAC" */
+ s->lac = bts->location_area_code;
break;
case GSM_SUBSCRIBER_UPDATE_DETACHED:
/* Only detach if we are currently attached to this bts */
- if (bts == s->current_bts)
+ if (bts == s->current_bts) {
s->current_bts = NULL;
+ /* Indicate "detached" */
+ s->lac = 0;
+ }
+
break;
default:
fprintf(stderr, "subscr_update with unknown reason: %d\n",