Skip to content
Snippets Groups Projects
Commit f609ac6c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -66,7 +66,7 @@ FILE* fopen_dstats(scfg_t* cfg, uint node, BOOL for_write) ...@@ -66,7 +66,7 @@ FILE* fopen_dstats(scfg_t* cfg, uint node, BOOL for_write)
char path[MAX_PATH+1]; char path[MAX_PATH+1];
dstats_fname(cfg, node, path, sizeof(path)); 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) ...@@ -83,7 +83,7 @@ FILE* fopen_cstats(scfg_t* cfg, uint node, BOOL for_write)
/****************************************************************************/ /****************************************************************************/
BOOL fclose_dstats(FILE* fp) BOOL fclose_dstats(FILE* fp)
{ {
return iniCloseFile(fp); return fclose(fp);
} }
/****************************************************************************/ /****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment