diff options
author | Holger Freyther <zecke@selfish.org> | 2009-06-04 14:27:39 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-06-04 14:27:39 +0000 |
commit | c3d4b2d441814a37736791911fce1f4e3725ac35 (patch) | |
tree | 9d51a1abe05214d8cea6b663100595e572f8d78a /src | |
parent | 862cfff60944771cf72e03f0b4e0ad075817fcd4 (diff) |
[subscr] Remove the struct gsm_bts pointer from subscriber
The pointer was initially added to support to open a lchan
by using the gsm_subscriber structure. We would have restored
the struct gsm_bts from the db when loading the subscriber.
Instead we will dynamically resolve the gsm_bts and might end
up paging multiple bts in the same (stored/old) location area
until it answers.
Diffstat (limited to 'src')
-rw-r--r-- | src/gsm_subscriber.c | 8 |
1 files changed, 2 insertions, 6 deletions
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: |