CompuServe Messages

Net Render != Local Rndr

    25-Feb-94 13:12:01
Fm: Marion K. Marks 70700,2777
To: Nik Grant [adesk] 70421,76
We're using LANtastic 5.0. But file sharing is handled by SHARE.EXE and the extensions to the INT 21 MS-DOS function call BIOS routine that it adds to MS-DOS, not by the LAN software. I know exactly what the problem is. The problem is that 3DS is failing to set the "SHARED READ-ONLY" access flags when it calls the INT 21h File Open call. That flag ONLY applies to file sharing (whether networks or any sort of multitasking or both), and is ignored if there is no SHARE.EXE loaded. The point is, any number of users (be they LAN workstations, tasks on the same machine, or whatever) can open a given file for READ access at a time, since there is no possibility of it being changed while another user is trying to read it. But if any ONE user opens it with WRITE access enabled (and the default is to enable write access, unless that flag is set!), then any other attempts to open the file in any mode will fail with an "Access Denied" error message, unless the programs in question are all designed for shared database-style record-locking (actually byte-range locking) access. Since 3DSr3 just reads in the whole bitmap file, it does not perform byte-range locking (that's only useful for multi-user database and similar apps). Therefore, the whole file is locked if any one user succeeds in opening the file with write access enabled (whether or not the program actually writes to the file). Regardless of the type of network or multitasking system, opening a file in READ-ONLY ACCESS mode will permit multiple users to open it in that same mode. But once any one or more users open the file in that mode, no one can open it with WRITE ACCESS enabled until all users who have the file open in READ-ONLY ACCESS mode have closed it. If the file has the READ-ONLY Attribute marked in its directory entry, then the file can only be opened in READ-ONLY ACCESS mode. Any attempt to open it in any other mode will instead drop down to this mode (unless the attempt was for Write-ONLY mode, in which case the open will fail with an Access Denied error). Thus, performing an "ATTRIB +R *.*" on the contents of all MAPS-PATH directories and the IMAGE-PATH directory will kludgingly "fix" (bypass) the problem. In summary: INT 21 receives an OPEN call: Is READ-ONLY mode requested? Yes: Does anyone have the file open for WRITE ENABLED access? Yes: Fail — Access Denied No: Succeed and return to program with file open. Is WRITE-ONLY mode requested? Yes: Does anyone else have the file open in other than SHARED WRITE mode? Yes: Fail– Access Denied No: Succeed and return to program with file open. Is the file marked READ-ONLY in the directory? Yes: Treat the file as if READ-ONLY mode was requested (see above). Does anyone else have the file open in other than SHARED WRITE mode? Yes: Fail — Access Denied No: Succeed and return to program with file open. Because 3DSr3 is apparently not specifying any ACCESS parameters, the decision tree skips to the bottom question, which thus fails if anyone else (say, any Network Rendering Slave) has the file open, regardless of the mode (remember, Shared Write is only used by multi-user databases). This really needs to be fixed ASAP, IMHO.