(journal_entry): Flush journal if debug is on.
This commit is contained in:
parent
b843490799
commit
0649fbbb25
1 changed files with 3 additions and 1 deletions
|
@ -87,11 +87,13 @@ journal_entry(char *fmt, ...)
|
|||
|
||||
for (p = (unsigned char *)buf; *p; p++) {
|
||||
if (isprint(*p))
|
||||
putc(*p, journal);
|
||||
putc(*p, journal);
|
||||
else
|
||||
fprintf(journal, "\\%03o", *p);
|
||||
}
|
||||
fputs("\n", journal);
|
||||
if (debug)
|
||||
fflush(journal);
|
||||
if (ferror(journal)) {
|
||||
logerror("Error writing journal (%s)", strerror(errno));
|
||||
clearerr(journal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue