Skip to content
Snippets Groups Projects
Commit 7550784f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't close logfile_fp before running JavaScript externals

This would've prevented some JS log functions from writing to the node.log file
(which gets concatented onto the daily "system" log files).

This just came up via code review while looking into Keyop's reported error:
term Node 2 !ERROR 9 (Bad file descriptor) in main.cpp line 4606 (node_thread)
     truncating "logfile" access=0

This is likely unrelated since the "logfile" is immediately re-opened after
executing the external program/script.
parent 8a8c8bb8
No related branches found
No related tags found
No related merge requests found
......@@ -1382,7 +1382,7 @@ bool sbbs_t::exec_xtrn(uint xtrnnum, bool user_event)
, user_event ? "user event" : "program"
, cfg.xtrn[xtrnnum]->name);
logline("X-", str);
if (cfg.xtrn[xtrnnum]->cmd[0] != '*' && logfile_fp != NULL) {
if (cfg.xtrn[xtrnnum]->cmd[0] != '?' && cfg.xtrn[xtrnnum]->cmd[0] != '*' && logfile_fp != NULL) {
fclose(logfile_fp);
logfile_fp = NULL;
}
......
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