It does this when the ASP layer gives a network error. To work around it, we count the number of sessions (possibly overestimating) and convert the error to "unable to open session" if PFI has not reached its session limit (8).
We indicate that AFPBridge is installed by creating a message in the message center (which also includes its version, in case we want to distinguish between different versions in the future).
This is necessary because FIListSessions2 has a bug that causes it to return garbage in the server/zone fields for DSI sessions. (The bug is essentially that PFI is indexing into its own tables based on the ASP/DSI session number, rather than properly using a PFI-level session index.)
This avoids any possible strange behavior with calling Marinetti in P8 mode. It also ensures that I/O operations in P8 mode will give an error, but not terminate the connection: it will still be alive when we get back to GS/OS, unless the server has killed it due to inactivity (which is quite possible).
This can occur when control-reset is pressed in P8 mode. It’s supposed to reinitialize the AppleTalk stack. In our case, we mark connections to be reset once we're back in GS/OS, since we can't call Marinetti in P8 mode.
This only works if our init is loaded before Marinetti’s, because otherwise Marinetti’s shutdown notification procedure gets control first and shuts down the connection.
In that case, LoadOneTool returns an error, but the tool stub is still loaded, which is good enough (we just need its FPT to be loaded and installed in the TPT).
This should add support for a greater variety of servers, which may only support AFP 2.2 and up (or refuse to use older versions over TCP).
The IIgs software is designed for AFP 2.0. AFP 2.2 is close enough that things seem to work, but there could potentially be a few compatibility issues.
This could be unsafe for some forms of client code, but it looks like the AppleShare FST always actually has a large enough buffer to hold the full amount being requested, and can deal with up to 65535 bytes being returned at once. We take advantage of this to do larger reads in a single request, which provides a noticeable performance advantage.
This code tries to call EasyMount using the request procedure documented in its ERS, but it turns out that doesn't work. The request procedure trashes its return address on the stack, so it crashes whenever you call it.
This patch disables asynchronous SPCommand calls to work around the problem, which was causing hangs and crashes when those calls triggered. This effectively prevents the FST from automatically polling to check if the volume has been changed, but shouldn't cause other problems.
This issue arises because ASP requests and replies are limited to a “quantum size” of 4624 bytes even if the amount requested is larger, and the AppleShare FST relies on this behavior in sizing its buffers. DSI does not have this limitation, so it was returning more data than would fit in the buffer.
Also improve error checking, so an error is reported in cases where the buffer is too small.
This occurred because a global with structure type was declared without the structure definition in scope. ORCA/C allows this, and just treats the struct variable as having size 0. As a result, it effectively shares the storage of whatever comes after it in the OMF file, leading to memory trashing.