Changeset 8152 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 18, 2008 2:29:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/darwin/iokit.cpp
r8103 r8152 638 638 /** 639 639 * Worker function for DarwinGetUSBDevices() that tries to figure out 640 * what state the device is in .640 * what state the device is in and set enmState. 641 641 * 642 642 * This is mostly a matter of distinguishing between devices that nobody … … 657 657 return; 658 658 659 bool fHaveOwner = false; 659 660 RTPROCESS Owner = NIL_RTPROCESS; 661 bool fHaveClient = false; 660 662 RTPROCESS Client = NIL_RTPROCESS; 661 663 bool fUserClientOnly = true; … … 726 728 if (krc == KERN_SUCCESS) 727 729 { 728 darwinDictGetProccess(PropsRef, CFSTR(VBOXUSB_OWNER_KEY), &Owner);729 darwinDictGetProccess(PropsRef, CFSTR(VBOXUSB_CLIENT_KEY), &Client);730 fHaveOwner = darwinDictGetProccess(PropsRef, CFSTR(VBOXUSB_OWNER_KEY), &Owner); 731 fHaveClient = darwinDictGetProccess(PropsRef, CFSTR(VBOXUSB_CLIENT_KEY), &Client); 730 732 CFRelease(PropsRef); 731 733 } … … 739 741 * Calc the status. 740 742 */ 741 if ( Owner != NIL_RTPROCESS 742 && !Owner) 743 if (fHaveOwner) 743 744 { 744 745 if (Owner == RTProcSelf()) 745 pCur->enmState = Client == NIL_RTPROCESS || !Client746 pCur->enmState = !fHaveClient || Client == NIL_RTPROCESS || !Client 746 747 ? USBDEVICESTATE_HELD_BY_PROXY 747 748 : USBDEVICESTATE_USED_BY_GUEST;
Note:
See TracChangeset
for help on using the changeset viewer.