VirtualBox

Changeset 38452 in vbox


Ignore:
Timestamp:
Aug 15, 2011 8:50:33 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73500
Message:

Main/Medium: make CreateDiffMedium more convenient to use by associating the medium with a registry, and fix error handling in CloneTo by not attempting to save the config since this often causes spurious extra error messages

File:
1 edited

Legend:

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

    r38420 r38452  
    25392539    // locking: we need the tree lock first because we access parent pointers
    25402540    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
    2541     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     2541    AutoMultiWriteLock2 alock(this, diff COMMA_LOCKVAL_SRC_POS);
    25422542
    25432543    if (m->type == MediumType_Writethrough)
     
    25742574                        diff->getLocationFull().c_str());
    25752575    }
     2576
     2577    Guid parentMachineRegistry;
     2578    if (getFirstRegistryMachineId(parentMachineRegistry))
     2579    {
     2580        /* since this medium has been just created it isn't associated yet */
     2581        diff->m->llRegistryIDs.push_back(parentMachineRegistry);
     2582    }
     2583
    25762584    treeLock.release();
    25772585    alock.release();
     
    72367244
    72377245    // now, at the end of this task (always asynchronous), save the settings
     7246    if (SUCCEEDED(mrc))
    72387247    {
    72397248        // save the settings
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