diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-20 23:26:00 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-20 23:26:00 +0000 |
commit | 80dab82fca9f27783d826c98e1e904620c89502a (patch) | |
tree | 688b8ee5f0fe1aeb519e0376957dd1887143d41d /main/logger.c | |
parent | 5bbadf623ae3480afc37eb9f139bc2da451245c8 (diff) |
Flush out the file pointer. (issue #9115 reported by guthrie)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@55716 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/logger.c b/main/logger.c index ed4d0729b..d31aabd41 100644 --- a/main/logger.c +++ b/main/logger.c @@ -705,6 +705,8 @@ static void logger_print_normal(struct logmsg *logmsg) fprintf(stderr, "Logger Warning: Unable to write to log file '%s': %s (disabled)\n", chan->filename, strerror(errno)); manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno)); chan->disabled = 1; + } else if (res > 0) { + fflush(chan->fileptr); } } } |