X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..ca66cea69e6e866fd781ae2260d9474bdd48f2ca:/iokit/Kernel/IODataQueue.cpp?ds=inline diff --git a/iokit/Kernel/IODataQueue.cpp b/iokit/Kernel/IODataQueue.cpp index 263de30dc..3a7f4c832 100644 --- a/iokit/Kernel/IODataQueue.cpp +++ b/iokit/Kernel/IODataQueue.cpp @@ -82,9 +82,9 @@ Boolean IODataQueue::initWithCapacity(UInt32 size) return false; } - dataQueue->queueSize = size; - dataQueue->head = 0; - dataQueue->tail = 0; + dataQueue->queueSize = size; + dataQueue->head = 0; + dataQueue->tail = 0; return true; } @@ -208,7 +208,7 @@ void IODataQueue::sendDataAvailableNotification() mach_msg_header_t * msgh; msgh = (mach_msg_header_t *)notifyMsg; - if (msgh) { + if (msgh && msgh->msgh_remote_port) { kr = mach_msg_send_from_kernel(msgh, msgh->msgh_size); switch(kr) { case MACH_SEND_TIMED_OUT: // Notification already sent