VirtualBox

Changeset 8152 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 18, 2008 2:29:15 PM (17 years ago)
Author:
vboxsync
Message:

status fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/darwin/iokit.cpp

    r8103 r8152  
    638638/**
    639639 * 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.
    641641 *
    642642 * This is mostly a matter of distinguishing between devices that nobody
     
    657657        return;
    658658
     659    bool fHaveOwner = false;
    659660    RTPROCESS Owner = NIL_RTPROCESS;
     661    bool fHaveClient = false;
    660662    RTPROCESS Client = NIL_RTPROCESS;
    661663    bool fUserClientOnly = true;
     
    726728            if (krc == KERN_SUCCESS)
    727729            {
    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);
    730732                CFRelease(PropsRef);
    731733            }
     
    739741     * Calc the status.
    740742     */
    741     if (    Owner != NIL_RTPROCESS
    742         &&  !Owner)
     743    if (fHaveOwner)
    743744    {
    744745        if (Owner == RTProcSelf())
    745             pCur->enmState = Client == NIL_RTPROCESS || !Client
     746            pCur->enmState = !fHaveClient || Client == NIL_RTPROCESS || !Client
    746747                           ? USBDEVICESTATE_HELD_BY_PROXY
    747748                           : USBDEVICESTATE_USED_BY_GUEST;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette