[asterisk-commits] mogorman: trunk r43272 - in /trunk: apps/ channels/ main/ pbx/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Sep 19 09:23:45 MST 2006


Author: mogorman
Date: Tue Sep 19 11:23:45 2006
New Revision: 43272

URL: http://svn.digium.com/view/asterisk?rev=43272&view=rev
Log:
similar patch for verbose vs debug with minor changes
bug 2617

Modified:
    trunk/apps/app_dial.c
    trunk/apps/app_macro.c
    trunk/apps/app_queue.c
    trunk/channels/chan_sip.c
    trunk/main/asterisk.c
    trunk/main/config.c
    trunk/main/pbx.c
    trunk/pbx/pbx_gtkconsole.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue Sep 19 11:23:45 2006
@@ -1182,7 +1182,7 @@
 			/* Again, keep going even if there's an error */
 			if (option_debug)
 				ast_log(LOG_DEBUG, "ast call on peer returned %d\n", res);
-			else if (option_verbose > 2)
+			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst);
 			ast_hangup(tmp->chan);
 			tmp->chan = NULL;

Modified: trunk/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_macro.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Tue Sep 19 11:23:45 2006
@@ -238,14 +238,14 @@
 			case AST_PBX_KEEPALIVE:
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
-				else if (option_verbose > 1)
+				if (option_verbose > 1)
 					ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
 				goto out;
 				break;
 			default:
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
-				else if (option_verbose > 1)
+				if (option_verbose > 1)
 					ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
 				dead = 1;
 				goto out;

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Sep 19 11:23:45 2006
@@ -1636,7 +1636,7 @@
 		/* Again, keep going even if there's an error */
 		if (option_debug)
 			ast_log(LOG_DEBUG, "ast call on peer returned %d\n", res);
-		else if (option_verbose > 2)
+		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", tmp->interface);
 		do_hang(tmp);
 		(*busies)++;

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Sep 19 11:23:45 2006
@@ -7918,7 +7918,7 @@
 	}
 	transmit_state_notify(p, state, 1);
 
-	if (option_debug > 1)
+	if (option_verbose > 1)
 		ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
 	return 0;
 }

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Sep 19 11:23:45 2006
@@ -1185,7 +1185,7 @@
 	/* Called on exit */
 	if (option_verbose && ast_opt_console)
 		ast_verbose("Asterisk %s ending (%d).\n", ast_active_channels() ? "uncleanly" : "cleanly", num);
-	else if (option_debug)
+	if (option_debug)
 		ast_log(LOG_DEBUG, "Asterisk ending (%d).\n", num);
 	manager_event(EVENT_FLAG_SYSTEM, "Shutdown", "Shutdown: %s\r\nRestart: %s\r\n", ast_active_channels() ? "Uncleanly" : "Cleanly", restart ? "True" : "False");
 	if (ast_socket > -1) {

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Tue Sep 19 11:23:45 2006
@@ -717,21 +717,21 @@
 			ast_log(LOG_WARNING, "'%s' is not a regular file, ignoring\n", fn);
 			continue;
 		}
-		if ((option_verbose > 1) && !option_debug) {
+		if (option_verbose > 1) {
 			ast_verbose(VERBOSE_PREFIX_2 "Parsing '%s': ", fn);
 			fflush(stdout);
 		}
 		if (!(f = fopen(fn, "r"))) {
 			if (option_debug)
 				ast_log(LOG_DEBUG, "No file to parse: %s\n", fn);
-			else if (option_verbose > 1)
+			if (option_verbose > 1)
 				ast_verbose( "Not found (%s)\n", strerror(errno));
 			continue;
 		}
 		count++;
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Parsing %s\n", fn);
-		else if (option_verbose > 1)
+		if (option_verbose > 1)
 			ast_verbose("Found\n");
 		while(!feof(f)) {
 			lineno++;
@@ -835,7 +835,7 @@
 #else
 	if ((f = fopen(fn, "w"))) {
 #endif	    
-		if ((option_verbose > 1) && !option_debug)
+		if (option_verbose > 1)
 			ast_verbose(  VERBOSE_PREFIX_2 "Saving '%s': ", fn);
 		fprintf(f, ";!\n");
 		fprintf(f, ";! Automatically generated configuration file\n");
@@ -872,7 +872,7 @@
 	} else {
 		if (option_debug)
 			printf("Unable to open for writing: %s\n", fn);
-		else if (option_verbose > 1)
+		if (option_verbose > 1)
 			printf( "Unable to write (%s)", strerror(errno));
 		return -1;
 	}

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Sep 19 11:23:45 2006
@@ -2354,14 +2354,14 @@
 				if (res == AST_PBX_KEEPALIVE) {
 					if (option_debug)
 						ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited KEEPALIVE on '%s'\n", c->context, c->exten, c->priority, c->name);
-					else if (option_verbose > 1)
+					if (option_verbose > 1)
 						ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE on '%s'\n", c->context, c->exten, c->priority, c->name);
 					error = 1;
 					break;
 				}
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name);
-				else if (option_verbose > 1)
+				if (option_verbose > 1)
 					ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name);
 				if (c->_softhangup == AST_SOFTHANGUP_ASYNCGOTO) {
 					c->_softhangup =0;
@@ -2481,7 +2481,7 @@
 				/* Something bad happened, or a hangup has been requested. */
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name);
-				else if (option_verbose > 1)
+				if (option_verbose > 1)
 					ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name);
 				break;
 			}
@@ -3822,7 +3822,7 @@
 		*local_contexts = tmp;
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Registered context '%s'\n", tmp->name);
-		else if (option_verbose > 2)
+		if (option_verbose > 2)
 			ast_verbose( VERBOSE_PREFIX_3 "Registered extension context '%s'\n", tmp->name);
 	}
 
@@ -4796,7 +4796,8 @@
 			ast_log(LOG_DEBUG, "Added extension '%s' priority %d to %s\n",
 				tmp->exten, tmp->priority, con->name);
 		}
-	} else if (option_verbose > 2) {
+	}
+	if (option_verbose > 2) {
 		if (tmp->matchcid) {
 			ast_verbose( VERBOSE_PREFIX_3 "Added extension '%s' priority %d (CID match '%s')to %s\n",
 				tmp->exten, tmp->priority, tmp->cidmatch, con->name);

Modified: trunk/pbx/pbx_gtkconsole.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_gtkconsole.c?rev=43272&r1=43271&r2=43272&view=diff
==============================================================================
--- trunk/pbx/pbx_gtkconsole.c (original)
+++ trunk/pbx/pbx_gtkconsole.c Tue Sep 19 11:23:45 2006
@@ -495,7 +495,7 @@
 	} else {
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Unable to start GTK console monitor -- ignoring\n");
-		else if (option_verbose > 1)
+		if (option_verbose > 1)
 			ast_verbose( VERBOSE_PREFIX_2 "GTK is not available -- skipping monitor\n");
 	}
 	return 0;



More information about the asterisk-commits mailing list