diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-12-02 11:28:38 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-09 10:01:08 +0100 |
commit | a1e0373224e02784f85eb47306a689fce45fb9e3 (patch) | |
tree | de1601fd704b93e9b747afc1c6f854896e8345d2 /openbsc/src/gprs/gprs_sgsn.c | |
parent | 207f4a5deba610b34d5e140f512e538e34a7115f (diff) |
sgsn: Put SGSN related subscriber data into separate struct
There will be an increasing number of SGSN related fields per
subscriber. Instead of extending gsm_subscriber accordingly, a single
struct sgsn_subscriber_data object is assigned to it. The talloc
context used to allocated that object is the subscr object itself.
Therefore it will be freed automatically along with the subscr
object.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gprs_sgsn.c')
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 525bfab11..d5c02fd7c 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -191,7 +191,7 @@ void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm) if (mm->subscr) { struct gsm_subscriber *subscr = mm->subscr; mm->subscr = NULL; - subscr->mm = NULL; + subscr->sgsn_data->mm = NULL; gprs_subscr_delete(subscr); } @@ -477,9 +477,9 @@ void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx, LOGMMCTXP(LOGL_INFO, mmctx, "Subscriber data update"); - if (!subscr->mm && !mmctx->subscr) { + if (!subscr->sgsn_data->mm && !mmctx->subscr) { mmctx->subscr = subscr_get(subscr); - mmctx->subscr->mm = mmctx; + mmctx->subscr->sgsn_data->mm = mmctx; } sgsn_auth_update(mmctx); |