[asterisk-commits] branch oej/bug2617 - r7305 in /team/oej/bug2617:
./ apps/ channels/ pbx/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Dec 3 13:27:10 CST 2005
Author: oej
Date: Sat Dec 3 13:27:05 2005
New Revision: 7305
URL: http://svn.digium.com/view/asterisk?rev=7305&view=rev
Log:
Removed redundant logging
Modified:
team/oej/bug2617/apps/app_dial.c
team/oej/bug2617/apps/app_macro.c
team/oej/bug2617/apps/app_queue.c
team/oej/bug2617/asterisk.c
team/oej/bug2617/channels/chan_sip.c
team/oej/bug2617/config.c
team/oej/bug2617/pbx.c
team/oej/bug2617/pbx/pbx_gtkconsole.c
Modified: team/oej/bug2617/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/apps/app_dial.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/apps/app_dial.c (original)
+++ team/oej/bug2617/apps/app_dial.c Sat Dec 3 13:27:05 2005
@@ -1108,10 +1108,8 @@
/* check the results of ast_call */
if (res) {
/* 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)
- ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst);
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s (return value %d)\n", numsubst, res);
ast_hangup(tmp->chan);
tmp->chan = NULL;
cur = rest;
Modified: team/oej/bug2617/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/apps/app_macro.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/apps/app_macro.c (original)
+++ team/oej/bug2617/apps/app_macro.c Sat Dec 3 13:27:05 2005
@@ -220,16 +220,12 @@
res = 0;
goto out;
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);
goto out;
}
@@ -241,7 +237,8 @@
}
/* don't stop executing extensions when we're in "h" */
if (chan->_softhangup && strcasecmp(oldexten,"h")) {
- ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n",
+ if (option_debug > 1)
+ ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n",
chan->exten, chan->priority);
goto out;
}
Modified: team/oej/bug2617/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/apps/app_queue.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/apps/app_queue.c (original)
+++ team/oej/bug2617/apps/app_queue.c Sat Dec 3 13:27:05 2005
@@ -1406,10 +1406,8 @@
res = ast_call(tmp->chan, location, 0);
if (res) {
/* 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)
- ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", tmp->interface);
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s (return value %d)\n", tmp->interface, res);
ast_hangup(tmp->chan);
tmp->chan = NULL;
tmp->stillgoing = 0;
Modified: team/oej/bug2617/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/asterisk.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/asterisk.c (original)
+++ team/oej/bug2617/asterisk.c Sat Dec 3 13:27:05 2005
@@ -882,7 +882,7 @@
/* Called on exit */
if (option_verbose && option_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: team/oej/bug2617/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/channels/chan_sip.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/channels/chan_sip.c (original)
+++ team/oej/bug2617/channels/chan_sip.c Sat Dec 3 13:27:05 2005
@@ -6321,7 +6321,7 @@
transmit_state_notify(p, state, 1, 1);
if (option_debug > 1)
- ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
+ ast_log(LOG_DEBUG, "Extension %s: new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
return 0;
}
Modified: team/oej/bug2617/config.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/config.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/config.c (original)
+++ team/oej/bug2617/config.c Sat Dec 3 13:27:05 2005
@@ -579,22 +579,15 @@
ast_log(LOG_WARNING, "'%s' is not a regular file, ignoring\n", fn);
continue;
}
- if ((option_verbose > 1) && !option_debug) {
- 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)
- ast_verbose( "Not found (%s)\n", strerror(errno));
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Configuration file %s not found (%s)\n", fn, strerror(errno));
continue;
}
+ if (option_verbose > 1) {
+ ast_verbose(VERBOSE_PREFIX_2 "Parsing configuration file '%s': ", fn);
+ }
count++;
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %s\n", fn);
- else if (option_verbose > 1)
- ast_verbose("Found\n");
while(!feof(f)) {
lineno++;
if (fgets(buf, sizeof(buf), f)) {
@@ -697,7 +690,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");
@@ -732,7 +725,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: team/oej/bug2617/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/pbx.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/pbx.c (original)
+++ team/oej/bug2617/pbx.c Sat Dec 3 13:27:05 2005
@@ -2297,15 +2297,11 @@
case 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)
- ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE on '%s'\n", c->context, c->exten, c->priority, c->name);
goto out;
break;
default:
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)
- 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;
break;
@@ -2442,8 +2438,6 @@
/* 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)
- 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;
}
c->priority++;
@@ -3661,9 +3655,7 @@
tmp->includes = NULL;
tmp->ignorepats = NULL;
*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);
} else
ast_log(LOG_ERROR, "Out of memory\n");
@@ -4634,7 +4626,8 @@
} else { \
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); \
} else { \
Modified: team/oej/bug2617/pbx/pbx_gtkconsole.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/pbx/pbx_gtkconsole.c?rev=7305&r1=7304&r2=7305&view=diff
==============================================================================
--- team/oej/bug2617/pbx/pbx_gtkconsole.c (original)
+++ team/oej/bug2617/pbx/pbx_gtkconsole.c Sat Dec 3 13:27:05 2005
@@ -496,7 +496,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