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

Log errors upon any dsts.ini write failures.

parent 6893c78d
Branches
Tags
No related merge requests found
...@@ -659,7 +659,8 @@ uint sbbs_t::logonstats() ...@@ -659,7 +659,8 @@ uint sbbs_t::logonstats()
fwrite_cstats(csts, &stats); fwrite_cstats(csts, &stats);
fclose_cstats(csts); fclose_cstats(csts);
rolloverstats(&stats); rolloverstats(&stats);
fwrite_dstats(dsts, &stats, __FUNCTION__); if(!fwrite_dstats(dsts, &stats, __FUNCTION__))
errormsg(WHERE, ERR_WRITE, "dsts.ini", i);
} }
fclose_dstats(dsts); fclose_dstats(dsts);
} }
...@@ -685,7 +686,8 @@ uint sbbs_t::logonstats() ...@@ -685,7 +686,8 @@ uint sbbs_t::logonstats()
} else { } else {
stats.today.logons++; stats.today.logons++;
stats.total.logons++; stats.total.logons++;
fwrite_dstats(fp, &stats, __FUNCTION__); if(!fwrite_dstats(fp, &stats, __FUNCTION__))
errormsg(WHERE, ERR_WRITE, "dsts.ini", i);
} }
fclose_dstats(fp); fclose_dstats(fp);
} }
......
...@@ -4384,7 +4384,8 @@ void sbbs_t::logoffstats() ...@@ -4384,7 +4384,8 @@ void sbbs_t::logoffstats()
} else { } else {
stats.total.timeon += minutes_used; stats.total.timeon += minutes_used;
stats.today.timeon += minutes_used; stats.today.timeon += minutes_used;
fwrite_dstats(fp, &stats, __FUNCTION__); if(!fwrite_dstats(fp, &stats, __FUNCTION__))
errormsg(WHERE, ERR_WRITE, "dsts.ini", i);
} }
fclose_dstats(fp); fclose_dstats(fp);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment