- Timestamp:
- Jan 31, 2013 1:28:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r44274 r44490 10408 10408 AssertReturn(mMediaData.isBackedUp(), E_FAIL); 10409 10409 10410 /* Check if there are any implicitly created diff images. */ 10411 bool fImplicitDiffs = false; 10412 for (MediaData::AttachmentList::const_iterator it = mMediaData->mAttachments.begin(); 10413 it != mMediaData->mAttachments.end(); 10414 ++it) 10415 { 10416 const ComObjPtr<MediumAttachment> &pAtt = *it; 10417 if (pAtt->isImplicit()) 10418 { 10419 fImplicitDiffs = true; 10420 break; 10421 } 10422 } 10423 /* If there is nothing to do, leave early. This saves lots of image locking 10424 * effort. It also avoids a MachineStateChanged event without real reason. 10425 * This is important e.g. when loading a VM config, because there should be 10426 * no events. Otherwise API clients can become thoroughly confused for 10427 * inaccessible VMs (the code for loading VM configs uses this method for 10428 * cleanup if the config makes no sense), as they take such events as an 10429 * indication that the VM is alive, and they would force the VM config to 10430 * be reread, leading to an endless loop. */ 10431 if (!fImplicitDiffs) 10432 return S_OK; 10433 10410 10434 HRESULT rc = S_OK; 10411 10435 MachineState_T oldState = mData->mMachineState;
Note:
See TracChangeset
for help on using the changeset viewer.