projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testsuite: for CHUNKING set sender name explicitly
[exim.git]
/
src
/
src
/
log.c
diff --git
a/src/src/log.c
b/src/src/log.c
index fbf1042e751f54143962b8259812625db8ea4c50..6eb57ca750fe8bc6c7ea860ce2ea537b67009375 100644
(file)
--- a/
src/src/log.c
+++ b/
src/src/log.c
@@
-663,6
+663,14
@@
while ((t = string_nextinlist(&tt, &sep, log_buffer, LOG_BUFFER_SIZE)))
}
}
+void
+mainlog_close(void)
+{
+if (mainlogfd < 0) return;
+(void)close(mainlogfd);
+mainlogfd = -1;
+mainlog_inode = 0;
+}
/*************************************************
* Write message to log file *
/*************************************************
* Write message to log file *
@@
-1004,14
+1012,8
@@
if ( flags & LOG_MAIN
happening. */
if (mainlogfd >= 0)
happening. */
if (mainlogfd >= 0)
- {
if (Ustat(mainlog_name, &statbuf) < 0 || statbuf.st_ino != mainlog_inode)
if (Ustat(mainlog_name, &statbuf) < 0 || statbuf.st_ino != mainlog_inode)
- {
- (void)close(mainlogfd);
- mainlogfd = -1;
- mainlog_inode = 0;
- }
- }
+ mainlog_close();
/* If the log is closed, open it. Then write the line. */
/* If the log is closed, open it. Then write the line. */