[asterisk-commits] qwell: trunk r51266 - in /trunk: ./ apps/ funcs/
main/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Jan 18 15:56:36 MST 2007
Author: qwell
Date: Thu Jan 18 16:56:35 2007
New Revision: 51266
URL: http://svn.digium.com/view/asterisk?view=rev&rev=51266
Log:
Merged revisions 51265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51265 | qwell | 2007-01-18 16:50:23 -0600 (Thu, 18 Jan 2007) | 4 lines
Add some more checks for option_debug before ast_log(LOG_DEBUG, ...) calls.
Issue 8832, patch(es) by tgrman
........
Modified:
trunk/ (props changed)
trunk/apps/app_voicemail.c
trunk/funcs/func_strings.c
trunk/main/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=51266&r1=51265&r2=51266
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Jan 18 16:56:35 2007
@@ -1985,12 +1985,14 @@
create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, vmu->mailbox, "tmp");
snprintf(newtmp, sizeof(newtmp), "%s/XXXXXX", tmpdir);
tmpfd = mkstemp(newtmp);
- ast_log(LOG_DEBUG, "newtmp: %s\n", newtmp);
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "newtmp: %s\n", newtmp);
if (vmu->volgain < -.001 || vmu->volgain > .001) {
snprintf(tmpcmd, sizeof(tmpcmd), "sox -v %.4f %s.%s %s.%s", vmu->volgain, attach, format, newtmp, format);
ast_safe_system(tmpcmd);
attach = newtmp;
- ast_log(LOG_DEBUG, "VOLGAIN: Stored at: %s.%s - Level: %.4f - Mailbox: %s\n", attach, format, vmu->volgain, mailbox);
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "VOLGAIN: Stored at: %s.%s - Level: %.4f - Mailbox: %s\n", attach, format, vmu->volgain, mailbox);
}
fprintf(p, "--%s\r\n", bound);
fprintf(p, "Content-Type: %s%s; name=\"msg%04d.%s\"\r\n", ctype, format, msgnum, format);
@@ -2027,7 +2029,8 @@
}
if (!strcmp(format, "wav49"))
format = "WAV";
- ast_log(LOG_DEBUG, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH));
+ if (option_debug > 2)
+ ast_log(LOG_DEBUG, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH));
/* Make a temporary file instead of piping directly to sendmail, in case the mail
command hangs */
if ((p = vm_mkftemp(tmp)) == NULL) {
@@ -4649,7 +4652,8 @@
if(option_debug > 2)
ast_log (LOG_DEBUG,"vm_state user is:%s\n",vms->imapuser);
if (vms->mailstream == NIL || !vms->mailstream) {
- ast_log (LOG_DEBUG,"mailstream not set.\n");
+ if (option_debug)
+ ast_log (LOG_DEBUG,"mailstream not set.\n");
} else {
stream = vms->mailstream;
}
@@ -6407,7 +6411,8 @@
if(option_debug > 2)
ast_log(LOG_DEBUG, "Checking quotas: comparing %u to %u\n",vms.quota_usage,vms.quota_limit);
if (vms.quota_limit && vms.quota_usage >= vms.quota_limit) {
- ast_log(LOG_DEBUG, "*** QUOTA EXCEEDED!!\n");
+ if (option_debug)
+ ast_log(LOG_DEBUG, "*** QUOTA EXCEEDED!!\n");
cmd = ast_play_and_wait(chan, "vm-mailboxfull");
}
#endif
Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?view=diff&rev=51266&r1=51265&r2=51266
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Thu Jan 18 16:56:35 2007
@@ -35,6 +35,7 @@
#include <regex.h>
#include "asterisk/module.h"
+#include "asterisk/options.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=51266&r1=51265&r2=51266
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Jan 18 16:56:35 2007
@@ -4750,11 +4750,13 @@
}
if (option_debug) {
if (tmp->matchcid) {
- ast_log(LOG_DEBUG, "Added extension '%s' priority %d (CID match '%s') to %s\n",
- tmp->exten, tmp->priority, tmp->cidmatch, con->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Added extension '%s' priority %d (CID match '%s') to %s\n",
+ tmp->exten, tmp->priority, tmp->cidmatch, con->name);
} else {
- ast_log(LOG_DEBUG, "Added extension '%s' priority %d to %s\n",
- tmp->exten, tmp->priority, con->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Added extension '%s' priority %d to %s\n",
+ tmp->exten, tmp->priority, con->name);
}
}
if (option_verbose > 2) {
More information about the asterisk-commits
mailing list