[svn-commits] seanbright: trunk r212574 - /trunk/main/logger.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Aug 17 13:18:21 CDT 2009
Author: seanbright
Date: Mon Aug 17 13:18:16 2009
New Revision: 212574
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212574
Log:
Correct the return value check for ast_safe_system.
The logic here was reversed as ast_safe_system returns -1 on error and not on
success. Fix suggested by reporter.
(closes issue #15667)
Reported by: loic
Modified:
trunk/main/logger.c
Modified: trunk/main/logger.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/logger.c?view=diff&rev=212574&r1=212573&r2=212574
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Mon Aug 17 13:18:16 2009
@@ -539,7 +539,7 @@
char buf[512];
pbx_builtin_setvar_helper(c, "filename", filename);
pbx_substitute_variables_helper(c, exec_after_rotate, buf, sizeof(buf));
- if (ast_safe_system(buf) != -1) {
+ if (ast_safe_system(buf) == -1) {
ast_log(LOG_WARNING, "error executing '%s'\n", buf);
}
c = ast_channel_release(c);
More information about the svn-commits
mailing list