Commit ee3e8974 authored by rswindell's avatar rswindell
Browse files

nopen access-denied failures are now logged.

parent e905f2e4
......@@ -2147,14 +2147,17 @@ int sbbs_t::nopen(char *str, int access)
access|=O_BINARY;
while(((file=sopen(str,access,share))==-1)
&& (errno==EACCES || errno==EAGAIN) && count++<LOOP_NOPEN)
if(count)
mswait(100);
mswait(100);
if(count>(LOOP_NOPEN/2) && count<=LOOP_NOPEN) {
sprintf(logstr,"NOPEN COLLISION - File: %s Count: %d"
sprintf(logstr,"NOPEN COLLISION - File: \"%s\" Count: %d"
,str,count);
logline("!!",logstr); }
if(file==-1 && (errno==EACCES || errno==EAGAIN))
bputs("\7\r\nNOPEN: ACCESS DENIED\r\n\7");
if(file==-1 && (errno==EACCES || errno==EAGAIN)) {
sprintf(logstr,"NOPEN ACCESS DENIED - File: \"%s\" errno: %d"
,str,errno);
logline("!!",logstr);
bputs("\7\r\nNOPEN: ACCESS DENIED\r\n\7");
}
return(file);
}
......
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