VirtualBox

Ignore:
Timestamp:
Mar 11, 2010 12:32:23 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58674
Message:

Main: fix snapshot regression from yesterday (media registry not saved after takeSnapshot())

File:
1 edited

Legend:

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

    r27256 r27278  
    13981398
    13991399/**
    1400  * Implementation for IInternalMachineControl::beginTakingSnapshot().
     1400 * Implementation for IInternalMachineControl::endTakingSnapshot().
    14011401 *
    14021402 * Called by the Console when it's done saving the VM state into the snapshot
     
    14181418    AssertComRCReturn (autoCaller.rc(), autoCaller.rc());
    14191419
    1420     AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
     1420    AutoWriteLock machineLock(this COMMA_LOCKVAL_SRC_POS);
    14211421
    14221422    AssertReturn(   !aSuccess
     
    14621462        rc = saveSettings(NULL);
    14631463                // no need to change for whether VirtualBox.xml needs saving since
    1464                 // we can't have a machine XML rename pending at this point
     1464                // we'll save the global settings below anyway
    14651465    }
    14661466
     
    14931493    mSnapshotData.mLastState = MachineState_Null;
    14941494    mSnapshotData.mSnapshot.setNull();
     1495
     1496    // save VirtualBox.xml (media registry most probably changed with diff image)
     1497    machineLock.release();
     1498    AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
     1499    mParent->saveSettings();
    14951500
    14961501    return rc;
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