VirtualBox

Changeset 41849 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 20, 2012 2:19:06 PM (13 years ago)
Author:
vboxsync
Message:

Main/Bandwidth: server side limit validity check (#5582)

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

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

    r41842 r41849  
    412412STDMETHODIMP BandwidthControl::CreateBandwidthGroup(IN_BSTR aName, BandwidthGroupType_T aType, LONG64 aMaxBytesPerSec)
    413413{
     414    if (aMaxBytesPerSec <= 0)
     415        return setError(E_INVALIDARG,
     416                        tr("Bandwidth group limit must be positive"));
     417
    414418    AutoCaller autoCaller(this);
    415419    if (FAILED(autoCaller.rc())) return autoCaller.rc();
  • trunk/src/VBox/Main/src-server/BandwidthGroupImpl.cpp

    r41842 r41849  
    284284STDMETHODIMP BandwidthGroup::COMSETTER(MaxBytesPerSec)(LONG64 aMaxBytesPerSec)
    285285{
     286    if (aMaxBytesPerSec <= 0)
     287        return setError(E_INVALIDARG,
     288                        tr("Bandwidth group limit must be positive"));
     289
    286290    AutoCaller autoCaller(this);
    287291    if (FAILED(autoCaller.rc())) return autoCaller.rc();
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