Skip to content

Commit e5ae7a4

Browse files
trekawektschak909
authored andcommitted
Flush the logging output (required to support pipe for logging).
1 parent 6e44c5b commit e5ae7a4

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/log.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ void TNFSMSGLOG(Header *hdr, const char *msg, ...)
4747
va_end(vargs);
4848

4949
fprintf(output, "%d.%d.%d.%d s=%02x c=%02x q=%02x | %s\n", ip[0], ip[1], ip[2], ip[3], hdr->sid, hdr->cmd, hdr->seqno, buff);
50-
51-
#ifdef WIN32
5250
fflush(output);
53-
#endif
5451
}
5552

5653
void USGLOG(Header *hdr, const char *msg, ...)
@@ -74,10 +71,7 @@ void USGLOG(Header *hdr, const char *msg, ...)
7471
va_end(vargs);
7572

7673
fprintf(output, "%s|%d.%d.%d.%d|SID=%02x|%s\n", sdate, ip[0], ip[1], ip[2], ip[3], hdr->sid, buff);
77-
78-
#ifdef WIN32
7974
fflush(output);
80-
#endif
8175
}
8276

8377
void MSGLOG(in_addr_t ipaddr, const char *msg, ...)
@@ -94,10 +88,7 @@ void MSGLOG(in_addr_t ipaddr, const char *msg, ...)
9488
va_end(vargs);
9589

9690
fprintf(output, "%d.%d.%d.%d | %s\n", ip[0], ip[1], ip[2], ip[3], buff);
97-
98-
#ifdef WIN32
9991
fflush(output);
100-
#endif
10192
}
10293

10394
void LOG(const char *msg, ...)
@@ -109,10 +100,7 @@ void LOG(const char *msg, ...)
109100

110101
vfprintf(output, msg, vargs);
111102
va_end(vargs);
112-
113-
#ifdef WIN32
114103
fflush(output);
115-
#endif
116104
}
117105

118106
void log_time() {

0 commit comments

Comments
 (0)