aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-12 18:52:28 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-12 18:52:28 +0000
commit4a0562cbed3c62ea77c4f7780b7afa8411e6a7fb (patch)
treef5a564cda33b6afda5a9622c832014d9d7ea9347
parent3d6d58ccd39de3ede4f94fe1d803c92913205370 (diff)
Fix some silly formatting, and remove unnecessary option_debug checks
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@246460 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/channel.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/main/channel.c b/main/channel.c
index 6f4745617..8addc0d62 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;