From ee3e89742938b36d8e71c5974732eb73135e0524 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sat, 13 Apr 2002 00:57:32 +0000 Subject: [PATCH] nopen access-denied failures are now logged. --- src/sbbs3/main.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 4b51b70bcc..70acde405d 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -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); } -- GitLab