[lchan] Log increase/decrease of channel use count (Andreas Eversberg)
This is part of patch 22 and will log changes in the usecount
of the lchan.
diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h
index 145e406..d8b4c3e 100644
--- a/include/openbsc/gsm_data.h
+++ b/include/openbsc/gsm_data.h
@@ -40,10 +40,18 @@
#define LCHAN_RELEASE_TIMEOUT 4, 0
#define use_lchan(lchan) \
do { lchan->use_count++; \
+ DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) increases usage to: %d\n", \
+ lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
+ lchan->nr, lchan->use_count); \
bsc_schedule_timer(&lchan->release_timer, LCHAN_RELEASE_TIMEOUT); } while(0);
#define put_lchan(lchan) \
- do { lchan->use_count--; } while(0);
+ do { lchan->use_count--; \
+ DEBUGP(DCC, "lchan (bts=%d,trx=%d,ts=%d,ch=%d) decreases usage to: %d\n", \
+ lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, \
+ lchan->nr, lchan->use_count); \
+ } while(0);
+
/* communications link with a BTS */
struct gsm_bts_link {