mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-06 21:09:47 +00:00
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/branches/1.8@279390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -690,9 +690,10 @@ static int reload_logger(int rotate)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (qlog) {
|
||||||
fclose(qlog);
|
fclose(qlog);
|
||||||
qlog = NULL;
|
qlog = NULL;
|
||||||
|
}
|
||||||
snprintf(old, sizeof(old), "%s/%s", ast_config_AST_LOG_DIR, queue_log_name);
|
snprintf(old, sizeof(old), "%s/%s", ast_config_AST_LOG_DIR, queue_log_name);
|
||||||
if (queue_rotate) {
|
if (queue_rotate) {
|
||||||
rotate_file(old);
|
rotate_file(old);
|
||||||
@@ -720,8 +721,9 @@ static int reload_logger(int rotate)
|
|||||||
a full Asterisk reload) */
|
a full Asterisk reload) */
|
||||||
int logger_reload(void)
|
int logger_reload(void)
|
||||||
{
|
{
|
||||||
if(reload_logger(0))
|
if (reload_logger(0)) {
|
||||||
return RESULT_FAILURE;
|
return RESULT_FAILURE;
|
||||||
|
}
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user