summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gsm_subscriber.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gsm_subscriber.c b/src/gsm_subscriber.c
index 67aa7936b..488850637 100644
--- a/src/gsm_subscriber.c
+++ b/src/gsm_subscriber.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <openbsc/gsm_subscriber.h>
+#include <openbsc/debug.h>
#include <openbsc/db.h>
@@ -119,12 +120,17 @@ int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason)
struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr)
{
subscr->use_count++;
+ DEBUGP(DCC, "subscr %s usage increases usage to: %d\n",
+ subscr->extension, subscr->use_count);
return subscr;
}
struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr)
{
- if (--subscr->use_count <= 0)
+ subscr->use_count--;
+ DEBUGP(DCC, "subscr %s usage decreased usage to: %d\n",
+ subscr->extension, subscr->use_count);
+ if (subscr->use_count <= 0)
subscr_free(subscr);
return NULL;
}