diff options
-rw-r--r-- | include/openbsc/gsm_subscriber.h | 1 | ||||
-rw-r--r-- | src/gsm_subscriber.c | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/include/openbsc/gsm_subscriber.h b/include/openbsc/gsm_subscriber.h index 1798dc651..99148b5df 100644 --- a/include/openbsc/gsm_subscriber.h +++ b/include/openbsc/gsm_subscriber.h @@ -23,7 +23,6 @@ struct gsm_subscriber { /* for internal management */ int use_count; struct llist_head entry; - struct gsm_bts *current_bts; }; enum gsm_subscriber_field { diff --git a/src/gsm_subscriber.c b/src/gsm_subscriber.c index 488850637..3f608ec30 100644 --- a/src/gsm_subscriber.c +++ b/src/gsm_subscriber.c @@ -96,17 +96,13 @@ int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason) /* FIXME: Migrate pending requests from one BSC to another */ 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) { - s->current_bts = NULL; - /* Indicate "detached" */ + /* Only detach if we are currently in this area */ + if (bts->location_area_code == s->lac) s->lac = 0; - } break; default: |