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

Don't log an error if there's no dsts.ini or dsts.dab file

In a fresh install, neither of these files would exist, and that's normal,
so getstats() should just return true in that case (with the stats struct
zeroed-out).

Fixes error during login to a new install reported by Zoltán Gábor on
Facebook.
parent 57032767
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -163,8 +163,10 @@ BOOL getstats(scfg_t* cfg, uint node, stats_t* stats)
} legacy_stats;
SAFEPRINTF(path,"%sdsts.dab",node ? cfg->node_path[node-1] : cfg->ctrl_dir);
if(!fexistcase(path))
return TRUE;
if((file=nopen(path,O_RDONLY))==-1) {
return(FALSE);
return(FALSE);
}
int rd = read(file, &legacy_stats, sizeof(legacy_stats));
close(file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment