diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-17 18:18:16 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-17 18:18:16 +0000 |
commit | 864cae562c2c92dcc9481544463409f25572d011 (patch) | |
tree | 59239f12c6228049c22dbf371b2e1ab173e6479a /main | |
parent | c8faf066620b89ebdc0b28009560a0deaec545e8 (diff) |
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/trunk@212574 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-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 02cf4f4fc..ea8c10d45 100644 --- a/main/logger.c +++ b/main/logger.c @@ -539,7 +539,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); } c = ast_channel_release(c); |