[asterisk-commits] seanbright: branch 1.6.0 r212578 - /branches/1.6.0/main/logger.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 17 13:21:40 CDT 2009


Author: seanbright
Date: Mon Aug 17 13:21:36 2009
New Revision: 212578

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212578
Log:
Merged revisions 212574 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r212574 | seanbright | 2009-08-17 14:18:16 -0400 (Mon, 17 Aug 2009) | 8 lines
  
  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:
    branches/1.6.0/main/logger.c

Modified: branches/1.6.0/main/logger.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/main/logger.c?view=diff&rev=212578&r1=212577&r2=212578
==============================================================================
--- branches/1.6.0/main/logger.c (original)
+++ branches/1.6.0/main/logger.c Mon Aug 17 13:21:36 2009
@@ -522,7 +522,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);
 		}
 		ast_channel_free(c);




More information about the asterisk-commits mailing list