diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-15 15:57:51 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-15 15:57:51 +0000 |
commit | 7b94df1c5a22d21d213cc6d5101ed34eb3d86afb (patch) | |
tree | ace714fce8d4bce20e11474f46258271dca93c29 /codecs | |
parent | ea5a97590eb75e316bf9bb79e77259f129b0b389 (diff) |
Only print debug info in codec_dahdi if we are asking for it.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@206635 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r-- | codecs/codec_dahdi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/codecs/codec_dahdi.c b/codecs/codec_dahdi.c index ceffa3024..c3ab031c8 100644 --- a/codecs/codec_dahdi.c +++ b/codecs/codec_dahdi.c @@ -412,7 +412,9 @@ static int dahdi_translate(struct ast_trans_pvt *pvt, int dest, int source) ztp->fmts.srcfmt = (1 << source); ztp->fmts.dstfmt = (1 << dest); - ast_log(LOG_DEBUG, "Opening transcoder channel from %d to %d.\n", source, dest); + if (option_debug) { + ast_log(LOG_DEBUG, "Opening transcoder channel from %d to %d.\n", source, dest); + } retry: if (ioctl(fd, DAHDI_TC_ALLOCATE, &ztp->fmts)) { @@ -426,11 +428,15 @@ retry: * we'll just convert from ulaw to signed linear in * software. */ if (AST_FORMAT_SLINEAR == ztp->fmts.srcfmt) { - ast_log(LOG_DEBUG, "Using soft_slin support on source\n"); + if (option_debug) { + ast_log(LOG_DEBUG, "Using soft_slin support on source\n"); + } ztp->softslin = 1; ztp->fmts.srcfmt = AST_FORMAT_ULAW; } else if (AST_FORMAT_SLINEAR == ztp->fmts.dstfmt) { - ast_log(LOG_DEBUG, "Using soft_slin support on destination\n"); + if (option_debug) { + ast_log(LOG_DEBUG, "Using soft_slin support on destination\n"); + } ztp->softslin = 1; ztp->fmts.dstfmt = AST_FORMAT_ULAW; } |