mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
gprs: Rename gprs_subscr_delete to gprs_subscr_cleanup
The old name is somewhat misleading. The function is rather preparing the subscriber for a subsequent subscr_free, that is possibly invoked by a subscr_put. It detaches the subscriber from the MM context and optionally invokes a PURGE_MS procedure. Therefore the _cleanup suffix is chosen (see mm_ctx_cleanup_free). Sponsored-by: On-Waves ehf
This commit is contained in:
committed by
Holger Hans Peter Freyther
parent
3ee67ff5c2
commit
3e4e58f349
@@ -325,7 +325,7 @@ struct gsm_auth_tuple *sgsn_auth_get_tuple(struct sgsn_mm_ctx *mmctx,
|
||||
int gprs_subscr_init(struct sgsn_instance *sgi);
|
||||
int gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx);
|
||||
int gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx);
|
||||
void gprs_subscr_delete(struct gsm_subscriber *subscr);
|
||||
void gprs_subscr_cleanup(struct gsm_subscriber *subscr);
|
||||
struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi);
|
||||
struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx( struct sgsn_mm_ctx *mmctx);
|
||||
struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi);
|
||||
|
@@ -199,7 +199,7 @@ void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm)
|
||||
struct gsm_subscriber *subscr = mm->subscr;
|
||||
mm->subscr = NULL;
|
||||
subscr->sgsn_data->mm = NULL;
|
||||
gprs_subscr_delete(subscr);
|
||||
gprs_subscr_cleanup(subscr);
|
||||
subscr_put(subscr);
|
||||
}
|
||||
|
||||
|
@@ -127,7 +127,7 @@ struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi)
|
||||
return subscr_active_by_imsi(NULL, imsi);
|
||||
}
|
||||
|
||||
void gprs_subscr_delete(struct gsm_subscriber *subscr)
|
||||
void gprs_subscr_cleanup(struct gsm_subscriber *subscr)
|
||||
{
|
||||
if (subscr->sgsn_data->mm) {
|
||||
subscr_put(subscr->sgsn_data->mm->subscr);
|
||||
@@ -150,7 +150,7 @@ void gprs_subscr_cancel(struct gsm_subscriber *subscr)
|
||||
subscr->flags &= ~GPRS_SUBSCRIBER_ENABLE_PURGE;
|
||||
|
||||
gprs_subscr_update(subscr);
|
||||
gprs_subscr_delete(subscr);
|
||||
gprs_subscr_cleanup(subscr);
|
||||
}
|
||||
|
||||
static int gprs_subscr_tx_gsup_message(struct gsm_subscriber *subscr,
|
||||
|
@@ -269,7 +269,7 @@ static void test_subscriber(void)
|
||||
OSMO_ASSERT(last_updated_subscr == s1);
|
||||
|
||||
/* There is no subscriber cache. Verify it */
|
||||
gprs_subscr_delete(s1);
|
||||
gprs_subscr_cleanup(s1);
|
||||
subscr_put(s1);
|
||||
s1 = NULL;
|
||||
sfound = gprs_subscr_get_by_imsi(imsi1);
|
||||
@@ -279,7 +279,7 @@ static void test_subscriber(void)
|
||||
assert_subscr(s3, imsi3);
|
||||
|
||||
/* Free entry 2 (GSM_SUBSCRIBER_FIRST_CONTACT is set) */
|
||||
gprs_subscr_delete(s2);
|
||||
gprs_subscr_cleanup(s2);
|
||||
subscr_put(s2);
|
||||
s2 = NULL;
|
||||
OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi1) == NULL);
|
||||
@@ -287,7 +287,7 @@ static void test_subscriber(void)
|
||||
assert_subscr(s3, imsi3);
|
||||
|
||||
/* Try to delete entry 3 */
|
||||
gprs_subscr_delete(s3);
|
||||
gprs_subscr_cleanup(s3);
|
||||
subscr_put(s3);
|
||||
s3 = NULL;
|
||||
OSMO_ASSERT(gprs_subscr_get_by_imsi(imsi3) == NULL);
|
||||
|
Reference in New Issue
Block a user