From cc1b2c100fc6dd44a690652ecd3c5788b0438ea7 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Sun, 2 Nov 2008 18:52:13 +0000 Subject: bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b --- main/logger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main/logger.c') diff --git a/main/logger.c b/main/logger.c index d09d8271f..4e3a2b73c 100644 --- a/main/logger.c +++ b/main/logger.c @@ -576,7 +576,9 @@ 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)); - system(buf); + if (system(buf) < 0) { + ast_log(LOG_WARNING, "system() failed for '%s': %s\n", buf, strerror(errno)); + } ast_channel_free(c); } return res; -- cgit v1.2.3