VirtualBox

Changeset 28856 in vbox


Ignore:
Timestamp:
Apr 27, 2010 7:47:35 PM (15 years ago)
Author:
vboxsync
Message:

Main/Snapshot: update lock states at the end of a live merge to the default state

File:
1 edited

Legend:

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

    r28852 r28856  
    31453145        pTarget->deparent();
    31463146        pTarget->setParent(pParentForTarget);
    3147         if (aParentForTarget)
     3147        if (pParentForTarget)
    31483148            pSource->deparent();
    31493149
     
    32473247    }
    32483248
     3249    /* Could be in principle folded into the previous loop, but let's keep
     3250     * things simple. Update the medium locking to be the standard state:
     3251     * all parent images locked for reading, just the last diff for writing. */
     3252    lockListBegin = pMediumLockList->GetBegin();
     3253    lockListEnd = pMediumLockList->GetEnd();
     3254    MediumLockList::Base::iterator lockListLast = lockListEnd;
     3255    lockListLast--;
     3256    for (MediumLockList::Base::iterator it = lockListBegin;
     3257         it != lockListEnd;
     3258         ++it)
     3259    {
     3260         it->UpdateLock(it == lockListLast);
     3261    }
     3262
     3263
    32493264    return S_OK;
    32503265}
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