Skip to content

Commit

Permalink
santa-driver: Change when we consider the client connected to avoid g…
Browse files Browse the repository at this point in the history
…etting into a state where events are being held but no memory descriptor is in place yet.
  • Loading branch information
russellhancox committed Mar 10, 2015
1 parent 28a94cd commit 56d4a6b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/santa-driver/SantaDriverClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ IOReturn SantaDriverClient::clientMemoryForType(UInt32 type,
fSharedMemory->retain(); // client will decrement this ref
*memory = fSharedMemory;

fSDM->ConnectClient(fDataQueue, proc_selfpid());
LOGI("Client connected, PID: %d.", proc_selfpid());

return kIOReturnSuccess;
}

Expand Down Expand Up @@ -122,10 +125,6 @@ IOReturn SantaDriverClient::open() {
return kIOReturnVMError;
}

fSDM->ConnectClient(fDataQueue, proc_selfpid());

LOGI("Client connected, PID: %d.", proc_selfpid());

return kIOReturnSuccess;
}

Expand Down

0 comments on commit 56d4a6b

Please sign in to comment.