Changeset 85908 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 27, 2020 5:10:34 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 140095
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r85769 r85908 3516 3516 3517 3517 if ( (pAttachTemp = i_findAttachment(*mMediumAttachments.data(), medium)) 3518 && !medium.isNull() 3518 && !medium.isNull() && medium->i_getType() != MediumType_Readonly 3519 && medium->i_getDeviceType() != DeviceType_DVD 3519 3520 ) 3520 3521 return setError(VBOX_E_OBJECT_IN_USE, -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r85820 r85908 4296 4296 } 4297 4297 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()) 4298 4303 { 4299 4304 // Allow MediumType_Readonly mediums and DVD in particular to be attached twice. … … 4305 4310 return S_OK; 4306 4311 } 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 4315 4313 /* sanity: no duplicate attachments */ 4316 4314 if (it->fInCurState) … … 4327 4325 // otherwise: a snapshot medium is being attached 4328 4326 4329 /* sanity: no duplicate attachments */4327 /* sanity: no duplicate attachments except MediumType_Readonly (DVD) */ 4330 4328 for (GuidList::const_iterator jt = it->llSnapshotIds.begin(); 4331 4329 jt != it->llSnapshotIds.end(); … … 4334 4332 const Guid &idOldSnapshot = *jt; 4335 4333 4336 if (idOldSnapshot == aSnapshotId) 4334 if ( idOldSnapshot == aSnapshotId 4335 && m->type != MediumType_Readonly 4336 && m->devType != DeviceType_DVD 4337 ) 4337 4338 { 4338 4339 #ifdef DEBUG
Note:
See TracChangeset
for help on using the changeset viewer.