Work around problem with asynchronous polling calls from AppleShare FST.

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 commit is contained in:
Stephen Heumann 2017-04-03 20:19:30 -05:00
parent 3f40a3190d
commit c119492cec
1 changed files with 17 additions and 0 deletions

View File

@ -68,6 +68,23 @@ void DispatchASPCommand(SPCommandRec *commandRec) {
commandRec->result = atInvalidCmdErr;
goto ret;
}
/*
* Hack to avoid hangs/crashes related to the AppleShare FST's
* asynchronous polling to check if volumes have been modified.
* This effectively disables that mechanism (which is the only
* real user of asynchronous ASP calls).
*
* TODO Identify and fix the underlying issue.
*/
if ((commandRec->async & AT_ASYNC)
&& commandRec->command == aspCommandCommand)
{
commandRec->result = atSyncErr;
CallCompletionRoutine((void*)commandRec->completionPtr);
goto ret;
}
i = commandRec->refNum - SESSION_NUM_START;
sess = &sessionTbl[i];
sess->spCommandRec = commandRec;