From: Jason Parker Date: Fri, 12 Feb 2010 18:52:28 +0000 (+0000) Subject: Fix some silly formatting, and remove unnecessary option_debug checks X-Git-Tag: 1.4.30-rc3~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=403eb70599a63c9a20ef2f7bf5cd66564006c886;p=thirdparty%2Fasterisk.git Fix some silly formatting, and remove unnecessary option_debug checks git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@246460 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/channel.c b/main/channel.c index 6f47456178..8addc0d629 100644 --- a/main/channel.c +++ b/main/channel.c @@ -5086,17 +5086,15 @@ int __ast_channel_unlock(struct ast_channel *chan, const char *filename, int lin ast_log(LOG_DEBUG, ":::=== Still have %d locks (recursive)\n", count); #endif if (!res) - if (option_debug) - ast_log(LOG_DEBUG, "::::==== Channel %s was unlocked\n", chan->name); - if (res == EINVAL) { - if (option_debug) - ast_log(LOG_DEBUG, "::::==== Channel %s had no lock by this thread. Failed unlocking\n", chan->name); - } + ast_log(LOG_DEBUG, "::::==== Channel %s was unlocked\n", chan->name); + if (res == EINVAL) { + ast_log(LOG_DEBUG, "::::==== Channel %s had no lock by this thread. Failed unlocking\n", chan->name); } - if (res == EPERM) { - /* We had no lock, so okay any way*/ - if (option_debug > 3) - ast_log(LOG_DEBUG, "::::==== Channel %s was not locked at all \n", chan->name); + } + if (res == EPERM) { + /* We had no lock, so okay any way*/ + if (option_debug > 3) + ast_log(LOG_DEBUG, "::::==== Channel %s was not locked at all \n", chan->name); res = 0; } return res; @@ -5126,13 +5124,11 @@ int __ast_channel_lock(struct ast_channel *chan, const char *filename, int linen if (!res) ast_log(LOG_DEBUG, "::::==== Channel %s was locked\n", chan->name); if (res == EDEADLK) { - /* We had no lock, so okey any way */ - if (option_debug > 3) + /* We had no lock, so okey any way */ ast_log(LOG_DEBUG, "::::==== Channel %s was not locked by us. Lock would cause deadlock.\n", chan->name); } if (res == EINVAL) { - if (option_debug > 3) - ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name); + ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name); } } return res; @@ -5162,15 +5158,13 @@ int __ast_channel_trylock(struct ast_channel *chan, const char *filename, int li ast_log(LOG_DEBUG, "::::==== Channel %s was locked\n", chan->name); if (res == EBUSY) { /* We failed to lock */ - if (option_debug > 2) - ast_log(LOG_DEBUG, "::::==== Channel %s failed to lock. Not waiting around...\n", chan->name); + ast_log(LOG_DEBUG, "::::==== Channel %s failed to lock. Not waiting around...\n", chan->name); } if (res == EDEADLK) { /* We had no lock, so okey any way*/ - if (option_debug > 2) - ast_log(LOG_DEBUG, "::::==== Channel %s was not locked. Lock would cause deadlock.\n", chan->name); + ast_log(LOG_DEBUG, "::::==== Channel %s was not locked. Lock would cause deadlock.\n", chan->name); } - if (res == EINVAL && option_debug > 2) + if (res == EINVAL) ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name); } return res;