]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IODataQueue.cpp
xnu-1228.5.20.tar.gz
[apple/xnu.git] / iokit / Kernel / IODataQueue.cpp
index 263de30dc5132dfbab4ec242ca58e80f9f71ee88..3a7f4c832f3e18e36cf4f05e1ca25d708ca23466 100644 (file)
@@ -82,9 +82,9 @@ Boolean IODataQueue::initWithCapacity(UInt32 size)
         return false;
     }
 
         return false;
     }
 
-    dataQueue->queueSize = size;
-    dataQueue->head = 0;
-    dataQueue->tail = 0;
+    dataQueue->queueSize    = size;
+    dataQueue->head         = 0;
+    dataQueue->tail         = 0;
 
     return true;
 }
 
     return true;
 }
@@ -208,7 +208,7 @@ void IODataQueue::sendDataAvailableNotification()
     mach_msg_header_t *        msgh;
 
     msgh = (mach_msg_header_t *)notifyMsg;
     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
         kr = mach_msg_send_from_kernel(msgh, msgh->msgh_size);
         switch(kr) {
             case MACH_SEND_TIMED_OUT:  // Notification already sent