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

If the user number is 0, don't open the user file (user.dat) - the read

of the user record is going to fail anyway. *this* explains a lot of
instances of the user.dat file being open concurrently, at least one per
active thread with a JS context.
parent 7cee046f
No related branches found
No related tags found
No related merge requests found
...@@ -128,7 +128,7 @@ enum { ...@@ -128,7 +128,7 @@ enum {
static void js_getuserdat(scfg_t* scfg, private_t* p) static void js_getuserdat(scfg_t* scfg, private_t* p)
{ {
if(!p->cached) { if(p->user->number != 0 && !p->cached) {
if(p->file < 1) if(p->file < 1)
p->file = openuserdat(scfg, /* for_modify: */FALSE); p->file = openuserdat(scfg, /* for_modify: */FALSE);
if(fgetuserdat(scfg, p->user, p->file)==0) if(fgetuserdat(scfg, p->user, p->file)==0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment