Support "asynchronous" LookupName calls (not really executed asynchronously).
This allows the "choose" utility from Apple to work.
This commit is contained in:
parent
35bcc701d3
commit
dca542e0cd
|
@ -10,6 +10,7 @@
|
||||||
#include "asmglue.h"
|
#include "asmglue.h"
|
||||||
#include "aspinterface.h"
|
#include "aspinterface.h"
|
||||||
#include "installcmds.h"
|
#include "installcmds.h"
|
||||||
|
#include "cmdproc.h"
|
||||||
|
|
||||||
struct ATIPMapping atipMapping;
|
struct ATIPMapping atipMapping;
|
||||||
|
|
||||||
|
@ -40,10 +41,6 @@ LongWord DoLookupName(NBPLookupNameRec *commandRec) {
|
||||||
Word stateReg;
|
Word stateReg;
|
||||||
|
|
||||||
stateReg = ForceRomIn();
|
stateReg = ForceRomIn();
|
||||||
|
|
||||||
// TODO support async calls
|
|
||||||
if (commandRec->async)
|
|
||||||
return_error(atSyncErr);
|
|
||||||
|
|
||||||
// Length needed for result, assuming the request is for our type/zone
|
// Length needed for result, assuming the request is for our type/zone
|
||||||
count = offsetof(NBPLUNameBufferRec, entityName)
|
count = offsetof(NBPLUNameBufferRec, entityName)
|
||||||
|
@ -146,6 +143,9 @@ haveMapping:
|
||||||
resultBuf->socketNum = atipMapping.socket;
|
resultBuf->socketNum = atipMapping.socket;
|
||||||
commandRec->actualMatch = 1;
|
commandRec->actualMatch = 1;
|
||||||
commandRec->result = 0;
|
commandRec->result = 0;
|
||||||
|
if ((commandRec->async & AT_ASYNC) && commandRec->completionPtr != 0) {
|
||||||
|
CallCompletionRoutine((void *)commandRec->completionPtr);
|
||||||
|
}
|
||||||
RestoreStateReg(stateReg);
|
RestoreStateReg(stateReg);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue