summaryrefslogtreecommitdiff
path: root/main/logger.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-02-20 23:26:00 +0000
committerJoshua Colp <jcolp@digium.com>2007-02-20 23:26:00 +0000
commit746e139e6db98dd84689e8a404b2a19946f7c046 (patch)
tree688b8ee5f0fe1aeb519e0376957dd1887143d41d /main/logger.c
parent62cb480f286f0e110021ab960e6d0099c783552c (diff)
Flush out the file pointer. (issue #9115 reported by guthrie)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c2
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);
}
}
}