summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-07-25 17:33:45 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-07-25 17:33:45 +0000
commit046a2dc3b1b3e4025166dff493a38dc1a46f45f9 (patch)
treeb5d3f98f4949e0bcc5e1eb8dcf7fdb9db7d73508
parent7f08adba618d28964edbaf25533c4d49e98ff857 (diff)
Merged revisions 279390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r279390 | tilghman | 2010-07-25 12:32:21 -0500 (Sun, 25 Jul 2010) | 8 lines Don't assume qlog is open. (closes issue #17704) Reported by: vrban Patches: issue17704.patch uploaded by pabelanger (license 224) Tested by: vrban ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/logger.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/logger.c b/main/logger.c
index 3a28d42b8..304c03a90 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -690,9 +690,10 @@ static int reload_logger(int rotate)
break;
}
}
-
- fclose(qlog);
- qlog = NULL;
+ if (qlog) {
+ fclose(qlog);
+ qlog = NULL;
+ }
snprintf(old, sizeof(old), "%s/%s", ast_config_AST_LOG_DIR, queue_log_name);
if (queue_rotate) {
rotate_file(old);
@@ -720,8 +721,9 @@ static int reload_logger(int rotate)
a full Asterisk reload) */
int logger_reload(void)
{
- if(reload_logger(0))
+ if (reload_logger(0)) {
return RESULT_FAILURE;
+ }
return RESULT_SUCCESS;
}