VirtualBox

Changeset 85908 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 27, 2020 5:10:34 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140095
Message:

Main: bugref:9623: Fixed issue causes the assertion during VBoxSVC unload. Fixed the issues during snapshots creating/deleting

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

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

    r85769 r85908  
    35163516
    35173517    if (    (pAttachTemp = i_findAttachment(*mMediumAttachments.data(), medium))
    3518          && !medium.isNull()
     3518         && !medium.isNull() && medium->i_getType() != MediumType_Readonly
     3519         &&  medium->i_getDeviceType() != DeviceType_DVD
    35193520       )
    35203521        return setError(VBOX_E_OBJECT_IN_USE,
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r85820 r85908  
    42964296    }
    42974297
     4298    // if the caller has not supplied a snapshot ID, then we're attaching
     4299    // to a machine a medium which represents the machine's current state,
     4300    // so set the flag
     4301
     4302    if (aSnapshotId.isZero())
    42984303    {
    42994304        // Allow MediumType_Readonly mediums and DVD in particular to be attached twice.
     
    43054310            return S_OK;
    43064311        }
    4307     }
    4308 
    4309     // if the caller has not supplied a snapshot ID, then we're attaching
    4310     // to a machine a medium which represents the machine's current state,
    4311     // so set the flag
    4312 
    4313     if (aSnapshotId.isZero())
    4314     {
     4312
    43154313        /* sanity: no duplicate attachments */
    43164314        if (it->fInCurState)
     
    43274325    // otherwise: a snapshot medium is being attached
    43284326
    4329     /* sanity: no duplicate attachments */
     4327    /* sanity: no duplicate attachments except MediumType_Readonly (DVD) */
    43304328    for (GuidList::const_iterator jt = it->llSnapshotIds.begin();
    43314329         jt != it->llSnapshotIds.end();
     
    43344332        const Guid &idOldSnapshot = *jt;
    43354333
    4336         if (idOldSnapshot == aSnapshotId)
     4334        if (   idOldSnapshot == aSnapshotId
     4335            && m->type != MediumType_Readonly
     4336            && m->devType != DeviceType_DVD
     4337           )
    43374338        {
    43384339#ifdef DEBUG
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