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
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index fdf4840..490371f 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -199,7 +199,7 @@
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);
}
diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c
index b7e6af4..ee6c477 100644
--- a/openbsc/src/gprs/gprs_subscriber.c
+++ b/openbsc/src/gprs/gprs_subscriber.c
@@ -127,7 +127,7 @@
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 @@
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,