[asterisk-commits] mmichelson: branch 1.6.1 r142001 - in /branches/1.6.1: ./ apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 9 07:34:46 CDT 2008


Author: mmichelson
Date: Tue Sep  9 07:34:45 2008
New Revision: 142001

URL: http://svn.digium.com/view/asterisk?view=rev&rev=142001
Log:
Merged revisions 141998 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r141998 | mmichelson | 2008-09-09 07:32:38 -0500 (Tue, 09 Sep 2008) | 7 lines

Use ast_debug for debug messages. I was wondering why debug
messages weren't showing up when I had set the debug level
high for just app_queue.c. It's because we were only checking
the global option_debug variable instead of using the awesome
macro which checks both the global and file-specific value


........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/apps/app_queue.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/apps/app_queue.c?view=diff&rev=142001&r1=142000&r2=142001
==============================================================================
--- branches/1.6.1/apps/app_queue.c (original)
+++ branches/1.6.1/apps/app_queue.c Tue Sep  9 07:34:45 2008
@@ -781,14 +781,12 @@
 	AST_LIST_UNLOCK(&interfaces);
 
 	if (!curint) {
-		if (option_debug > 2)
-			ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
+		ast_debug(3, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
 		ast_free(sc);
 		return 0;
 	}
 
-	if (option_debug)
-		ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+	ast_debug(1, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
 
 	update_status(sc->dev, sc->state);
 	ast_free(sc);
@@ -2319,8 +2317,7 @@
 		
 		/* If we have timed out, break out */
 		if (qe->expire && (time(NULL) >= qe->expire)) {
-			if (option_debug)
-				ast_log(LOG_DEBUG, "Queue timed out while ringing members.\n");
+			ast_debug(1, "Queue timed out while ringing members.\n");
 			ret = 0;
 			break;
 		}
@@ -3362,7 +3359,7 @@
 		AST_LIST_LOCK(dialed_interfaces);
 		AST_LIST_TRAVERSE(dialed_interfaces, di, list) {
 			if (!strcasecmp(cur->interface, di->interface)) {
-				ast_log(LOG_DEBUG, "Skipping dialing interface '%s' since it has already been dialed\n", 
+				ast_debug(1, "Skipping dialing interface '%s' since it has already been dialed\n", 
 					di->interface);
 				break;
 			}
@@ -3764,8 +3761,7 @@
 		}
 
 		if (!ast_strlen_zero(gosubexec)) {
-			if (option_debug)
-				ast_log(LOG_DEBUG, "app_queue: gosub=%s.\n", gosubexec);
+			ast_debug(1, "app_queue: gosub=%s.\n", gosubexec);
 			
 			res = ast_autoservice_start(qe->chan);
 			if (res) {
@@ -3795,8 +3791,7 @@
 					res = pbx_exec(qe->chan, application, gosub_args);
 					ast_pbx_run(qe->chan);
 					free(gosub_args);
-					if (option_debug)
-						ast_log(LOG_DEBUG, "Gosub exited with status %d\n", res);
+					ast_debug(1, "Gosub exited with status %d\n", res);
 				} else
 					ast_log(LOG_ERROR, "Could not Allocate string for Gosub arguments -- Gosub Call Aborted!\n");
 				
@@ -6358,7 +6353,6 @@
 	int wordlen = strlen(word);
 	char *ret = NULL;
 	if (pos != 3) /* Wha? */ {
-		ast_log(LOG_DEBUG, "Hitting this???, pos is %d\n", pos);
 		return NULL;
 	}
 




More information about the asterisk-commits mailing list