Commit f609ac6c authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Use fnopen() in fopen_dstats() to get open auto-retries

iniFileOpen() does not perform retries and there can be contention for the ctrl/dsts.ini file.
parent df9b2c9d
......@@ -66,7 +66,7 @@ FILE* fopen_dstats(scfg_t* cfg, uint node, BOOL for_write)
char path[MAX_PATH+1];
dstats_fname(cfg, node, path, sizeof(path));
return iniOpenFile(path, for_write);
return fnopen(NULL, path, for_write ? O_CREAT|O_RDWR : O_RDONLY);
}
/****************************************************************************/
......@@ -83,7 +83,7 @@ FILE* fopen_cstats(scfg_t* cfg, uint node, BOOL for_write)
/****************************************************************************/
BOOL fclose_dstats(FILE* fp)
{
return iniCloseFile(fp);
return fclose(fp);
}
/****************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment