Index: /trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp	(revision 54971)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -247,5 +247,5 @@
 
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent);
+    AutoMutableOrSavedStateDependency adep(mParent);
     if (FAILED(adep.rc())) return adep.rc();
 
Index: /trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp	(revision 54971)
@@ -396,5 +396,5 @@
 
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pParent);
+    AutoMutableOrSavedStateDependency adep(m->pParent);
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -425,5 +425,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pParent);
+    AutoMutableOrSavedStateDependency adep(m->pParent);
     if (FAILED(adep.rc())) return adep.rc();
 
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 54971)
@@ -1065,5 +1065,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    rc = i_checkStateDependency(MutableStateDep);
+    rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -1604,5 +1604,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -2927,5 +2927,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -2950,5 +2950,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -2986,5 +2986,5 @@
      */
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT hrc = i_checkStateDependency(MutableStateDep);
+    HRESULT hrc = i_checkStateDependency(MutableOrSavedStateDep);
     if (SUCCEEDED(hrc))
     {
@@ -3032,5 +3032,5 @@
 
     /* @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3054,5 +3054,5 @@
 
     /* @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3077,5 +3077,5 @@
 
     /* @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -3100,5 +3100,5 @@
 
     /* @todo deal with running state change. */
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4606,8 +4606,6 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = i_checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
-
-    AssertReturn(mData->mMachineState != MachineState_Saved, E_FAIL);
 
     if (Global::IsOnlineOrTransient(mData->mMachineState))
@@ -5078,4 +5076,5 @@
     HRESULT rc = S_OK;
 
+    /// @todo r=klaus this is stupid... why is the saved state always deleted?
     // discard saved state
     if (mData->mMachineState == MachineState_Saved)
Index: /trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp	(revision 54971)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,5 +21,4 @@
 #include "Global.h"
 
-#include "AutoStateDep.h"
 #include "AutoCaller.h"
 #include "Logging.h"
Index: /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 54971)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -626,6 +626,4 @@
 HRESULT NetworkAdapter::setNATNetwork(const com::Utf8Str &aNATNetwork)
 {
-
-
     /* the machine needs to be mutable */
     AutoMutableOrSavedOrRunningStateDependency adep(mParent);
Index: /trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp	(revision 54971)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -345,5 +345,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pMachine);
+    AutoMutableOrSavedStateDependency adep(m->pMachine);
     if (FAILED(adep.rc())) return adep.rc();
 
Index: /trunk/src/VBox/Main/src-server/SerialPortImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SerialPortImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/SerialPortImpl.cpp	(revision 54971)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -228,5 +228,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pMachine);
+    AutoMutableOrSavedStateDependency adep(m->pMachine);
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -395,5 +395,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pMachine);
+    AutoMutableOrSavedStateDependency adep(m->pMachine);
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -434,5 +434,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pMachine);
+    AutoMutableOrSavedStateDependency adep(m->pMachine);
     if (FAILED(adep.rc())) return adep.rc();
 
Index: /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp	(revision 54971)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2008-2014 Oracle Corporation
+ * Copyright (C) 2008-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
Index: /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp	(revision 54971)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2014 Oracle Corporation
+ * Copyright (C) 2006-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -454,5 +454,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->i_getMachine());
+    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -492,5 +492,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->i_getMachine());
+    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -601,5 +601,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->i_getMachine());
+    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -646,5 +646,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->i_getMachine());
+    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -787,5 +787,5 @@
 {
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->i_getMachine());
+    AutoMutableOrSavedOrRunningStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
Index: /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 54971)
@@ -1,9 +1,9 @@
 /* $Id$ */
 /** @file
- * Implementation of IUSBController.
+ * Implementation of IUSBDeviceFilters.
  */
 
 /*
- * Copyright (C) 2005-2014 Oracle Corporation
+ * Copyright (C) 2005-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -321,5 +321,5 @@
 
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pParent);
+    AutoMutableOrSavedOrRunningStateDependency adep(m->pParent);
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -348,5 +348,5 @@
 
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pParent);
+    AutoMutableOrSavedOrRunningStateDependency adep(m->pParent);
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -408,5 +408,5 @@
 #ifdef VBOX_WITH_USB
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(m->pParent);
+    AutoMutableOrSavedOrRunningStateDependency adep(m->pParent);
     if (FAILED(adep.rc())) return adep.rc();
 
Index: /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp	(revision 54970)
+++ /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp	(revision 54971)
@@ -1,2 +1,3 @@
+/* $Id$ */
 /** @file
  *
