Skip to content
Snippets Groups Projects
Commit 025f6ad3 authored by deuce's avatar deuce
Browse files

Make node.log line buffered so it is always current

parent 2e3846a8
No related branches found
No related tags found
No related merge requests found
......@@ -2995,6 +2995,7 @@ bool sbbs_t::init()
lprintf(LOG_ERR,"Perhaps this node is already running");
return(false);
}
setvbuf(logfile_fp, NULL, _IOLBF, 0);
if(filelength(fileno(logfile_fp))) {
log(crlf);
......
......@@ -1740,6 +1740,8 @@ bool sbbs_t::exec_xtrn(uint xtrnnum)
sprintf(str,"%snode.log",cfg.node_dir);
if((logfile_fp=fopen(str,"a+b"))==NULL)
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_APPEND);
else
setvbuf(logfile_fp, NULL, _IOLBF, 0);
}
sprintf(str,"%sfile/%04u.dwn",cfg.data_dir,useron.number);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment