diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-01-26 13:52:42 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-28 20:42:52 +0100 |
commit | 555b2e5ac128211edffa34a586fe5f548eb3acba (patch) | |
tree | 34a4a53e556255035857440448f277f6a96a4d57 /openbsc/include/openbsc/gprs_sgsn.h | |
parent | 925c57fb545b072159a831bff852c92795704dfe (diff) |
sgsn: Don't allow mmctx == NULL in sgsn_update_subscriber_data
Currently, sgsn_update_subscriber_data can be called with mmctx ==
NULL and will find and associate the right context (if present) based
on the subscriber's IMSI. This will not happen in regular use
any more, since sgsn_update_subscriber_data will only be called when
subscribers are used (auth mode 'remote') and in this case
gprs_subscr_get_or_create_by_mmctx will already be called by
sgsn_auth_request. Therefore, MM context and subscriber are always
associated except for some test cases and experimental VTY usage.
The current implementation of sgsn_update_subscriber_data also causes
additional complexity for the deletion on MM contexts to avoid a
ipossible double-free MM contexts.
This commit removes the MM context <-> subscriber association code
from sgsn_update_subscriber_data. That function must always be called
with mmctx != NULL, now. To avoid problems with VTY and test usage,
the calling subscriber function now only call
sgsn_update_subscriber_data when mmctx != NULL, since the purpose of
that function is to update that state of an existing MM context after
subscriber data has been changed.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc/gprs_sgsn.h')
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 533117a74..ce73e0189 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -339,8 +339,7 @@ int gprs_subscr_query_auth_info(struct gsm_subscriber *subscr); int gprs_subscr_location_update(struct gsm_subscriber *subscr); /* Called on subscriber data updates */ -void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx, - struct gsm_subscriber *subscr); +void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx); int gprs_sndcp_vty_init(void); struct sgsn_instance; |