aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/chan_alloc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-17 23:10:46 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-17 23:10:46 +0100
commitb1d4c8ed9d2b4ecb76355d71a152c22934c48504 (patch)
treeadc7234f321e78f2ca9046d9d3cfc5933b9c1a29 /openbsc/src/chan_alloc.c
parent66706812514c4baca743ad3a07e4556d48b6cded (diff)
logging: introduce log levels at caller site
This introduces a new LOGP() macro together with LOGL_* definition to support multiple log levels (severities) throughout the codebase. Please note that the actual logging system does not use them yet, in this patch we simply introduce the new macros at the caller site.
Diffstat (limited to 'openbsc/src/chan_alloc.c')
-rw-r--r--openbsc/src/chan_alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c
index 0a2984773..786e8b11b 100644
--- a/openbsc/src/chan_alloc.c
+++ b/openbsc/src/chan_alloc.c
@@ -210,7 +210,7 @@ struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type)
}
break;
default:
- fprintf(stderr, "Unknown gsm_chan_t %u\n", type);
+ LOGP(DRLL, LOGL_ERROR, "Unknown gsm_chan_t %u\n", type);
}
if (lchan) {
@@ -276,9 +276,9 @@ int lchan_auto_release(struct gsm_lchan *lchan)
}
/* spoofed? message */
- if (lchan->use_count < 0) {
- DEBUGP(DRLL, "Channel count is negative: %d\n", lchan->use_count);
- }
+ if (lchan->use_count < 0)
+ LOGP(DRLL, LOGL_ERROR, "Channel count is negative: %d\n",
+ lchan->use_count);
DEBUGP(DRLL, "Recycling the channel with: %d (%x)\n", lchan->nr, lchan->nr);
rsl_release_request(lchan, 0);