VirtualBox

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


Ignore:
Timestamp:
Mar 26, 2015 4:40:30 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99229
Message:

Main/AudioAdapter+BandwidthControl+Machine+NetworkAdapter+ParallelPort+SerialPort+StorageController+USBDeviceFilter+USBDeviceFilters: Adjust rules when settings can be changed to allow as much as possible. Some changes restored the old rules (a previous change made the definition more restrictive), but many now allow changing settings when VM is saved or even at runtime when it is safe. Will resolve many complaints, especially when the GUI also is adapted accordingly.

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

Legend:

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

    r51498 r54971  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    247247
    248248    /* the machine needs to be mutable */
    249     AutoMutableStateDependency adep(mParent);
     249    AutoMutableOrSavedStateDependency adep(mParent);
    250250    if (FAILED(adep.rc())) return adep.rc();
    251251
  • trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp

    r54511 r54971  
    396396
    397397    /* the machine needs to be mutable */
    398     AutoMutableStateDependency adep(m->pParent);
     398    AutoMutableOrSavedStateDependency adep(m->pParent);
    399399    if (FAILED(adep.rc())) return adep.rc();
    400400
     
    425425{
    426426    /* the machine needs to be mutable */
    427     AutoMutableStateDependency adep(m->pParent);
     427    AutoMutableOrSavedStateDependency adep(m->pParent);
    428428    if (FAILED(adep.rc())) return adep.rc();
    429429
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r54966 r54971  
    10651065    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    10661066
    1067     rc = i_checkStateDependency(MutableStateDep);
     1067    rc = i_checkStateDependency(MutableOrSavedStateDep);
    10681068    if (FAILED(rc)) return rc;
    10691069
     
    16041604    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    16051605
    1606     HRESULT rc = i_checkStateDependency(MutableStateDep);
     1606    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    16071607    if (FAILED(rc)) return rc;
    16081608
     
    29272927    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    29282928
    2929     HRESULT rc = i_checkStateDependency(MutableStateDep);
     2929    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    29302930    if (FAILED(rc)) return rc;
    29312931
     
    29502950    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    29512951
    2952     HRESULT rc = i_checkStateDependency(MutableStateDep);
     2952    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    29532953    if (FAILED(rc)) return rc;
    29542954
     
    29862986     */
    29872987    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    2988     HRESULT hrc = i_checkStateDependency(MutableStateDep);
     2988    HRESULT hrc = i_checkStateDependency(MutableOrSavedStateDep);
    29892989    if (SUCCEEDED(hrc))
    29902990    {
     
    30323032
    30333033    /* @todo deal with running state change. */
    3034     HRESULT rc = i_checkStateDependency(MutableStateDep);
     3034    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    30353035    if (FAILED(rc)) return rc;
    30363036
     
    30543054
    30553055    /* @todo deal with running state change. */
    3056     HRESULT rc = i_checkStateDependency(MutableStateDep);
     3056    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    30573057    if (FAILED(rc)) return rc;
    30583058
     
    30773077
    30783078    /* @todo deal with running state change. */
    3079     HRESULT rc = i_checkStateDependency(MutableStateDep);
     3079    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    30803080    if (FAILED(rc)) return rc;
    30813081
     
    31003100
    31013101    /* @todo deal with running state change. */
    3102     HRESULT rc = i_checkStateDependency(MutableStateDep);
     3102    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    31033103    if (FAILED(rc)) return rc;
    31043104
     
    46064606    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    46074607
    4608     HRESULT rc = i_checkStateDependency(MutableStateDep);
     4608    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
    46094609    if (FAILED(rc)) return rc;
    4610 
    4611     AssertReturn(mData->mMachineState != MachineState_Saved, E_FAIL);
    46124610
    46134611    if (Global::IsOnlineOrTransient(mData->mMachineState))
     
    50785076    HRESULT rc = S_OK;
    50795077
     5078    /// @todo r=klaus this is stupid... why is the saved state always deleted?
    50805079    // discard saved state
    50815080    if (mData->mMachineState == MachineState_Saved)
  • trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp

    r51498 r54971  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2121#include "Global.h"
    2222
    23 #include "AutoStateDep.h"
    2423#include "AutoCaller.h"
    2524#include "Logging.h"
  • trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp

    r54840 r54971  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    626626HRESULT NetworkAdapter::setNATNetwork(const com::Utf8Str &aNATNetwork)
    627627{
    628 
    629 
    630628    /* the machine needs to be mutable */
    631629    AutoMutableOrSavedOrRunningStateDependency adep(mParent);
  • trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp

    r51498 r54971  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    345345{
    346346    /* the machine needs to be mutable */
    347     AutoMutableStateDependency adep(m->pMachine);
     347    AutoMutableOrSavedStateDependency adep(m->pMachine);
    348348    if (FAILED(adep.rc())) return adep.rc();
    349349
  • trunk/src/VBox/Main/src-server/SerialPortImpl.cpp

    r51498 r54971  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    228228{
    229229    /* the machine needs to be mutable */
    230     AutoMutableStateDependency adep(m->pMachine);
     230    AutoMutableOrSavedStateDependency adep(m->pMachine);
    231231    if (FAILED(adep.rc())) return adep.rc();
    232232
     
    395395{
    396396    /* the machine needs to be mutable */
    397     AutoMutableStateDependency adep(m->pMachine);
     397    AutoMutableOrSavedStateDependency adep(m->pMachine);
    398398    if (FAILED(adep.rc())) return adep.rc();
    399399
     
    434434{
    435435    /* the machine needs to be mutable */
    436     AutoMutableStateDependency adep(m->pMachine);
     436    AutoMutableOrSavedStateDependency adep(m->pMachine);
    437437    if (FAILED(adep.rc())) return adep.rc();
    438438
  • trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp

    r51498 r54971  
    77
    88/*
    9  * Copyright (C) 2008-2014 Oracle Corporation
     9 * Copyright (C) 2008-2015 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp

    r51498 r54971  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    454454{
    455455    /* the machine needs to be mutable */
    456     AutoMutableStateDependency adep(mParent->i_getMachine());
     456    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
    457457    if (FAILED(adep.rc())) return adep.rc();
    458458
     
    492492{
    493493    /* the machine needs to be mutable */
    494     AutoMutableStateDependency adep(mParent->i_getMachine());
     494    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
    495495    if (FAILED(adep.rc())) return adep.rc();
    496496
     
    601601{
    602602    /* the machine needs to be mutable */
    603     AutoMutableStateDependency adep(mParent->i_getMachine());
     603    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
    604604    if (FAILED(adep.rc())) return adep.rc();
    605605    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     
    646646{
    647647    /* the machine needs to be mutable */
    648     AutoMutableStateDependency adep(mParent->i_getMachine());
     648    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
    649649    if (FAILED(adep.rc())) return adep.rc();
    650650
     
    787787{
    788788    /* the machine needs to be mutable */
    789     AutoMutableStateDependency adep(mParent->i_getMachine());
     789    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
    790790    if (FAILED(adep.rc())) return adep.rc();
    791791
  • trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp

    r51498 r54971  
    11/* $Id$ */
    22/** @file
    3  * Implementation of IUSBController.
     3 * Implementation of IUSBDeviceFilters.
    44 */
    55
    66/*
    7  * Copyright (C) 2005-2014 Oracle Corporation
     7 * Copyright (C) 2005-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    321321
    322322    /* the machine needs to be mutable */
    323     AutoMutableStateDependency adep(m->pParent);
     323    AutoMutableOrSavedOrRunningStateDependency adep(m->pParent);
    324324    if (FAILED(adep.rc())) return adep.rc();
    325325
     
    348348
    349349    /* the machine needs to be mutable */
    350     AutoMutableStateDependency adep(m->pParent);
     350    AutoMutableOrSavedOrRunningStateDependency adep(m->pParent);
    351351    if (FAILED(adep.rc())) return adep.rc();
    352352
     
    408408#ifdef VBOX_WITH_USB
    409409    /* the machine needs to be mutable */
    410     AutoMutableStateDependency adep(m->pParent);
     410    AutoMutableOrSavedOrRunningStateDependency adep(m->pParent);
    411411    if (FAILED(adep.rc())) return adep.rc();
    412412
  • trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp

    r54843 r54971  
     1/* $Id$ */
    12/** @file
    23 *
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