diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-17 18:21:38 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-17 18:21:38 +0000 |
commit | b37cfba5440f7882a5a4e5b29bd55bd331425ed7 (patch) | |
tree | 345876b13357614293fe296d07c0f5b5860470df /main/logger.c | |
parent | c1f151df2d22460596689acdaf6d4eeb8c32731f (diff) |
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
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@212579 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/logger.c b/main/logger.c index 40f1cda62..8a0f11094 100644 --- a/main/logger.c +++ b/main/logger.c @@ -571,7 +571,7 @@ static int rotate_file(const char *filename) 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); |