[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.
This commit is contained in:
parent
862cfff609
commit
c3d4b2d441
|
@ -23,7 +23,6 @@ struct gsm_subscriber {
|
||||||
/* for internal management */
|
/* for internal management */
|
||||||
int use_count;
|
int use_count;
|
||||||
struct llist_head entry;
|
struct llist_head entry;
|
||||||
struct gsm_bts *current_bts;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum gsm_subscriber_field {
|
enum gsm_subscriber_field {
|
||||||
|
|
|
@ -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 */
|
/* FIXME: Migrate pending requests from one BSC to another */
|
||||||
switch (reason) {
|
switch (reason) {
|
||||||
case GSM_SUBSCRIBER_UPDATE_ATTACHED:
|
case GSM_SUBSCRIBER_UPDATE_ATTACHED:
|
||||||
s->current_bts = bts;
|
|
||||||
/* Indicate "attached to LAC" */
|
/* Indicate "attached to LAC" */
|
||||||
s->lac = bts->location_area_code;
|
s->lac = bts->location_area_code;
|
||||||
break;
|
break;
|
||||||
case GSM_SUBSCRIBER_UPDATE_DETACHED:
|
case GSM_SUBSCRIBER_UPDATE_DETACHED:
|
||||||
/* Only detach if we are currently attached to this bts */
|
/* Only detach if we are currently in this area */
|
||||||
if (bts == s->current_bts) {
|
if (bts->location_area_code == s->lac)
|
||||||
s->current_bts = NULL;
|
|
||||||
/* Indicate "detached" */
|
|
||||||
s->lac = 0;
|
s->lac = 0;
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue