VirtualBox

Changeset 38432 in vbox for trunk/src


Ignore:
Timestamp:
Aug 12, 2011 12:00:20 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73476
Message:

Main/USB: don't propagate remote filtera to USBProxyService

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/USBControllerImpl.cpp

    r35638 r38432  
    534534
    535535    /* notify the proxy (only when it makes sense) */
    536     if (filter->getData().mActive && Global::IsOnline(adep.machineState()))
     536    if (filter->getData().mActive && Global::IsOnline(adep.machineState())
     537#ifdef RT_OS_WINDOWS
     538        && filter->getData().mRemote.isMatch (false)
     539#endif
     540    )
    537541    {
    538542        USBProxyService *service = m->pHost->usbProxyService();
     
    605609
    606610    /* notify the proxy (only when it makes sense) */
    607     if (filter->getData().mActive && Global::IsOnline(adep.machineState()))
     611    if (filter->getData().mActive && Global::IsOnline(adep.machineState())
     612#ifdef RT_OS_WINDOWS
     613        && filter->getData().mRemote.isMatch (false)
     614#endif
     615    )
    608616    {
    609617        USBProxyService *service = m->pHost->usbProxyService();
     
    768776                /* notify the proxy (only when it makes sense) */
    769777                if ((*it)->getData().mActive &&
    770                     Global::IsOnline (adep.machineState()))
     778                    Global::IsOnline (adep.machineState())
     779#ifdef RT_OS_WINDOWS
     780                    && (*it)->getData().mRemote.isMatch (false)
     781#endif
     782                )
    771783                {
    772784                    USBDeviceFilter *filter = *it;
     
    792804                {
    793805                    /* notify the proxy (only when necessary) */
    794                     if ((*it)->getData().mActive)
     806                    if ((*it)->getData().mActive
     807#ifdef RT_OS_WINDOWS
     808                            && (*it)->getData().mRemote.isMatch (false)
     809#endif
     810                            )
    795811                    {
    796812                        USBDeviceFilter *flt = *it; /* resolve ambiguity */
     
    10141030        if (aActiveChanged)
    10151031        {
    1016             /* insert/remove the filter from the proxy */
    1017             if (aFilter->getData().mActive)
     1032#ifdef RT_OS_WINDOWS
     1033            if (aFilter->getData().mRemote.isMatch (false))
     1034#endif
    10181035            {
    1019                 ComAssertRet(aFilter->getId() == NULL, E_FAIL);
    1020                 aFilter->getId() = service->insertFilter(&aFilter->getData().mUSBFilter);
    1021             }
    1022             else
    1023             {
    1024                 ComAssertRet(aFilter->getId() != NULL, E_FAIL);
    1025                 service->removeFilter(aFilter->getId());
    1026                 aFilter->getId() = NULL;
     1036                /* insert/remove the filter from the proxy */
     1037                if (aFilter->getData().mActive)
     1038                {
     1039                    ComAssertRet(aFilter->getId() == NULL, E_FAIL);
     1040                    aFilter->getId() = service->insertFilter(&aFilter->getData().mUSBFilter);
     1041                }
     1042                else
     1043                {
     1044                    ComAssertRet(aFilter->getId() != NULL, E_FAIL);
     1045                    service->removeFilter(aFilter->getId());
     1046                    aFilter->getId() = NULL;
     1047                }
    10271048            }
    10281049        }
     
    10341055                ComAssertRet(aFilter->getId() != NULL, E_FAIL);
    10351056                service->removeFilter(aFilter->getId());
    1036                 aFilter->getId() = service->insertFilter(&aFilter->getData().mUSBFilter);
     1057#ifdef RT_OS_WINDOWS
     1058                if (aFilter->getData().mRemote.isMatch (false))
     1059#endif
     1060                {
     1061                    aFilter->getId() = service->insertFilter(&aFilter->getData().mUSBFilter);
     1062                }
    10371063            }
    10381064        }
     
    12101236
    12111237        /* notify the proxy (only if the filter is active) */
    1212         if (flt->getData().mActive)
     1238        if (flt->getData().mActive
     1239#ifdef RT_OS_WINDOWS
     1240                && flt->getData().mRemote.isMatch (false) /* and if the filter is NOT remote */
     1241#endif
     1242                )
    12131243        {
    12141244            if (aInsertFilters)
Note: See TracChangeset for help on using the changeset viewer.

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