VirtualBox

Ignore:
Timestamp:
Apr 14, 2015 3:45:46 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99568
Message:

Main/Snapshot: only update the machine state on the VM process if there is one,
and introduce a new event when a snapshot has been restored instead of abusing t
he one for deleting a snapshot.

File:
1 edited

Legend:

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

    r55233 r55255  
    21732173            i_setMachineState(MachineState_PoweredOff);
    21742174
    2175         i_updateMachineStateOnClient();
    21762175        stateRestored = true;
    21772176
     
    22652264            /* restore the machine state */
    22662265            i_setMachineState(task.m_machineStateBackup);
    2267             i_updateMachineStateOnClient();
    22682266        }
    22692267    }
     
    22752273
    22762274    if (SUCCEEDED(rc))
    2277         mParent->i_onSnapshotDeleted(mData->mUuid, Guid());
     2275        mParent->i_onSnapshotRestored(mData->mUuid, Guid());
    22782276
    22792277    LogFlowThisFunc(("Done restoring snapshot (rc=%08X)\n", rc));
     
    24882486    // set the proper machine state here now (note: after creating a Task instance)
    24892487    if (mData->mMachineState == MachineState_Running)
     2488    {
    24902489        i_setMachineState(MachineState_DeletingSnapshotOnline);
     2490        i_updateMachineStateOnClient();
     2491    }
    24912492    else if (mData->mMachineState == MachineState_Paused)
     2493    {
    24922494        i_setMachineState(MachineState_DeletingSnapshotPaused);
     2495        i_updateMachineStateOnClient();
     2496    }
    24932497    else
    24942498        i_setMachineState(MachineState_DeletingSnapshot);
    2495     i_updateMachineStateOnClient();
    24962499
    24972500    /* return the progress to the caller */
     
    31663169        // task was started
    31673170        i_setMachineState(task.m_machineStateBackup);
    3168         i_updateMachineStateOnClient();
     3171        if (Global::IsOnline(mData->mMachineState))
     3172            i_updateMachineStateOnClient();
    31693173
    31703174        mParent->i_saveModifiedRegistries();
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