]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix some silly formatting, and remove unnecessary option_debug checks
authorJason Parker <jparker@digium.com>
Fri, 12 Feb 2010 18:52:28 +0000 (18:52 +0000)
committerJason Parker <jparker@digium.com>
Fri, 12 Feb 2010 18:52:28 +0000 (18:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@246460 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 6f474561785514f233f47b90a82757516deaca0d..8addc0d629b9e4d15baf9f8101db2eb192dfd0ec 100644 (file)
@@ -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;