- Timestamp:
- May 22, 2007 4:15:09 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 21358
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/darwin/iokit.cpp
r2607 r2755 201 201 /** The attach notification iterator. */ 202 202 io_iterator_t AttachIterator; 203 /** The 2nd attach notification iterator. */ 204 io_iterator_t AttachIterator2; 203 205 /** The detach notificaiton iterator. */ 204 206 io_iterator_t DetachIterator; 205 206 207 } DARWINUSBNOTIFY, *PDARWINUSBNOTIFY; 207 208 … … 225 226 226 227 /** 227 * Callback for the attach notifications.228 * Callback for the two attach notifications. 228 229 * 229 230 * @param pvNotify Our data. … … 283 284 284 285 /* 285 * Create the notifcation callback .286 * Create the notifcation callbacks. 286 287 */ 287 288 kern_return_t rc = IOServiceAddMatchingNotification(pNotify->NotifyPort, … … 295 296 darwinDrainIterator(pNotify->AttachIterator); 296 297 rc = IOServiceAddMatchingNotification(pNotify->NotifyPort, 297 kIO TerminatedNotification,298 kIOMatchedNotification, 298 299 IOServiceMatching(kIOUSBDeviceClassName), 299 darwinUSB DetachNotification,300 darwinUSBAttachNotification, 300 301 pNotify, 301 &pNotify-> DetachIterator);302 &pNotify->AttachIterator2); 302 303 if (rc == KERN_SUCCESS) 303 304 { 304 darwinDrainIterator(pNotify->DetachIterator); 305 return pNotify; 305 darwinDrainIterator(pNotify->AttachIterator2); 306 rc = IOServiceAddMatchingNotification(pNotify->NotifyPort, 307 kIOTerminatedNotification, 308 IOServiceMatching(kIOUSBDeviceClassName), 309 darwinUSBDetachNotification, 310 pNotify, 311 &pNotify->DetachIterator); 312 { 313 darwinDrainIterator(pNotify->DetachIterator); 314 return pNotify; 315 } 316 IOObjectRelease(pNotify->AttachIterator2); 306 317 } 307 318 IOObjectRelease(pNotify->AttachIterator); … … 331 342 IOObjectRelease(pNotify->AttachIterator); 332 343 pNotify->AttachIterator = NULL; 344 IOObjectRelease(pNotify->AttachIterator2); 345 pNotify->AttachIterator2 = NULL; 333 346 IOObjectRelease(pNotify->DetachIterator); 334 347 pNotify->DetachIterator = NULL; -
trunk/src/VBox/Main/include/USBProxyService.h
r2600 r2755 237 237 /** The opaque value returned by DarwinSubscribeUSBNotifications. */ 238 238 void *mNotifyOpaque; 239 /** A hack to work around the problem with the usb device enumration 240 * not including newly attached devices. */ 241 bool mWaitABitNextTime; 239 242 }; 240 243 # endif /* __DARWIN__ */
Note:
See TracChangeset
for help on using the changeset viewer.