VirtualBox

Changeset 93857 in vbox


Ignore:
Timestamp:
Feb 19, 2022 4:24:43 PM (3 years ago)
Author:
vboxsync
Message:

Restore Knut's (bird's) r149773 changes I accidentally clobbered with r150070

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r93855 r93857  
    14641464         * Bandwidth groups.
    14651465         */
     1466        ComPtr<IBandwidthControl> bwCtrl;
     1467
     1468        hrc = pMachine->COMGETTER(BandwidthControl)(bwCtrl.asOutParam());                   H();
     1469
     1470        com::SafeIfaceArray<IBandwidthGroup> bwGroups;
     1471        hrc = bwCtrl->GetAllBandwidthGroups(ComSafeArrayAsOutParam(bwGroups));              H();
     1472
    14661473        PCFGMNODE pAc;
     1474        InsertConfigNode(pPDM, "AsyncCompletion", &pAc);
    14671475        PCFGMNODE pAcFile;
     1476        InsertConfigNode(pAc,  "File", &pAcFile);
    14681477        PCFGMNODE pAcFileBwGroups;
    1469         ComPtr<IBandwidthControl> bwCtrl;
    1470         com::SafeIfaceArray<IBandwidthGroup> bwGroups;
    1471 
    1472         hrc = pMachine->COMGETTER(BandwidthControl)(bwCtrl.asOutParam());                   H();
    1473 
    1474         hrc = bwCtrl->GetAllBandwidthGroups(ComSafeArrayAsOutParam(bwGroups));              H();
    1475 
    1476         InsertConfigNode(pPDM, "AsyncCompletion", &pAc);
    1477         InsertConfigNode(pAc,  "File", &pAcFile);
    14781478        InsertConfigNode(pAcFile,  "BwGroups", &pAcFileBwGroups);
    14791479#ifdef VBOX_WITH_NETSHAPER
    14801480        PCFGMNODE pNetworkShaper;
     1481        InsertConfigNode(pPDM, "NetworkShaper",  &pNetworkShaper);
    14811482        PCFGMNODE pNetworkBwGroups;
    1482 
    1483         InsertConfigNode(pPDM, "NetworkShaper",  &pNetworkShaper);
    14841483        InsertConfigNode(pNetworkShaper, "BwGroups", &pNetworkBwGroups);
    14851484#endif /* VBOX_WITH_NETSHAPER */
     
    14881487        {
    14891488            Bstr strName;
    1490             LONG64 cMaxBytesPerSec;
    1491             BandwidthGroupType_T enmType;
    1492 
    1493             hrc = bwGroups[i]->COMGETTER(Name)(strName.asOutParam());                       H();
    1494             hrc = bwGroups[i]->COMGETTER(Type)(&enmType);                                   H();
    1495             hrc = bwGroups[i]->COMGETTER(MaxBytesPerSec)(&cMaxBytesPerSec);                 H();
    1496 
    14971489            if (strName.isEmpty())
    14981490                return pVMM->pfnVMR3SetError(pUVM, VERR_CFGM_NO_NODE, RT_SRC_POS, N_("No bandwidth group name specified"));
    14991491
     1492            BandwidthGroupType_T enmType = BandwidthGroupType_Null;
     1493            hrc = bwGroups[i]->COMGETTER(Type)(&enmType);                                   H();
     1494            LONG64 cMaxBytesPerSec = 0;
     1495            hrc = bwGroups[i]->COMGETTER(MaxBytesPerSec)(&cMaxBytesPerSec);                 H();
    15001496            if (enmType == BandwidthGroupType_Disk)
    15011497            {
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