Skip to content
Snippets Groups Projects
Commit e63bf13b authored by rswindell's avatar rswindell
Browse files

Don't call putmsgptrs() from logout() unless the SS_USERON sys_status flag

is set: this insures that uninitialized msg-scan ptrs/cfg won't be
written to disk unless a successful logon()/getmsgptrs() was called first.
This probably fixes the sighting that echicken reported where a failed
SSH login caused his sub-scan config file (data/user/0001.subs) to contain
uninitialized/garbage values.
logout() could be called from multiple places (e.g. JS and Baja modules),
even before a successful login is completed, so this sighting is not
entirely impractical.
parent dea38eb9
Branches
Tags
No related merge requests found
......@@ -108,7 +108,9 @@ void sbbs_t::logout()
remove(path);
delfiles(cfg.temp_dir,ALLFILES);
putmsgptrs();
if(sys_status&SS_USERON) { // Insures the useron actually when through logon()/getmsgptrs() first
putmsgptrs();
}
if(!REALSYSOP)
logofflist();
useron.laston=(time32_t)now;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment