[svn-commits] qwell: branch 1.4 r246460 - /branches/1.4/main/channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Feb 12 12:52:32 CST 2010


Author: qwell
Date: Fri Feb 12 12:52:28 2010
New Revision: 246460

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=246460
Log:
Fix some silly formatting, and remove unnecessary option_debug checks

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/channel.c?view=diff&rev=246460&r1=246459&r2=246460
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Fri Feb 12 12:52:28 2010
@@ -5086,17 +5086,15 @@
 			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);
-			}
-		}
-		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);
+			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);
 		res = 0;
 	}
 	return res;
@@ -5126,13 +5124,11 @@
 		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 @@
 			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);
-		}
-		if (res == EINVAL && option_debug > 2)
+			ast_log(LOG_DEBUG, "::::==== Channel %s was not locked. Lock would cause deadlock.\n", chan->name);
+		}
+		if (res == EINVAL)
 			ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name);
 	}
 	return res;




More information about the svn-commits mailing list