From 4f584c3d4b2ec3b9770880899b94d1683d5ce2ee Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Tue, 2 Jun 2009 02:55:07 +0000 Subject: [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. --- include/openbsc/gsm_data.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/openbsc') diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h index 145e406f9..d8b4c3ef7 100644 --- a/include/openbsc/gsm_data.h +++ b/include/openbsc/gsm_data.h @@ -40,10 +40,18 @@ typedef int gsm_cbfn(unsigned int hooknum, #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 { -- cgit v1.2.3