[asterisk-bugs] [Asterisk 0015667]: LOGGER WARNING : error executing after rotate

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 17 13:18:46 CDT 2009


The following issue has been RESOLVED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15667 
====================================================================== 
Reported By:                loic
Assigned To:                seanbright
====================================================================== 
Project:                    Asterisk
Issue ID:                   15667
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.6.1.2 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-08-06 08:36 CDT
Last Modified:              2009-08-17 13:18 CDT
====================================================================== 
Summary:                    LOGGER WARNING : error executing after rotate
Description: 
When the parameter "exec_after_rotate" is enabled on logger.conf (for
example to execute gzip -9 ${filename}.2 for compresing logs) and I execute
'asterisk -rx "logger rotate" I have this WARNING : 
WARNING[23788]: logger.c:581 rotate_file: error executing 'gzip -9
/var/log/asterisk/messages.2' for each log I want to rotate.

However rotate action and gzip compression are well executed.

To avoid that, I saw in logger.c and I found a mistake I think ;) :
 if (ast_safe_system(buf) != -1) 
{
         ast_log(LOG_WARNING, "error executing '%s'\n", buf);
}

It's not good because asterisk.c return -1 exclusively for problems when
executing 'the exec_after_rotate' command.

So, I replaced '!=' by '==' because for me it's the right symbol.

What do you think about that...




====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-17 13:18 svnbot         Status                   new => assigned     
2009-08-17 13:18 svnbot         Assigned To               => seanbright      
2009-08-17 13:18 svnbot         Status                   assigned => resolved
2009-08-17 13:18 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list