Changeset 76215 in vbox for trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
- Timestamp:
- Dec 13, 2018 6:58:16 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127481
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r74804 r76215 16 16 */ 17 17 18 #include <set> 19 #include <map> 18 20 #include "MachineImplCloneVM.h" 19 21 … … 730 732 pMediumLockList, 731 733 NULL /* aProgress */, 732 true /* aWait */); 734 true /* aWait */, 735 false /* aNotify */); 733 736 delete pMediumLockList; 734 737 if (FAILED(rc)) throw rc; … … 1016 1019 RTCList<ComObjPtr<Medium> > newMedia; /* All created images */ 1017 1020 RTCList<Utf8Str> newFiles; /* All extra created files (save states, ...) */ 1021 std::set<ComObjPtr<Medium> > pMediumsForNotify; 1022 std::map<Guid, DeviceType_T> uIdsForNotify; 1018 1023 try 1019 1024 { … … 1153 1158 /* diff image has to be used... */ 1154 1159 pNewParent = pDiff; 1160 pMediumsForNotify.insert(pDiff->i_getParent()); 1161 uIdsForNotify[pDiff->i_getId()] = pDiff->i_getDeviceType(); 1155 1162 } 1156 1163 else … … 1284 1291 progress2.asOutParam(), 1285 1292 uSrcParentIdx, 1286 uTrgParentIdx); 1293 uTrgParentIdx, 1294 false /* aNotify */); 1287 1295 srcLock.acquire(); 1288 1296 if (FAILED(rc)) throw rc; … … 1318 1326 * chain. */ 1319 1327 pNewParent = pTarget; 1328 uIdsForNotify[pTarget->i_getId()] = pTarget->i_getDeviceType(); 1320 1329 } 1321 1330 } … … 1356 1365 /* diff image has to be used... */ 1357 1366 pNewParent = pDiff; 1367 pMediumsForNotify.insert(pDiff->i_getParent()); 1368 uIdsForNotify[pDiff->i_getId()] = pDiff->i_getDeviceType(); 1358 1369 } 1359 1370 else … … 1534 1545 const ComObjPtr<Medium> &pMedium = newMedia.at(i - 1); 1535 1546 mrc = pMedium->i_deleteStorage(NULL /* aProgress */, 1536 true /* aWait */); 1547 true /* aWait */, 1548 false /* aNotify */); 1537 1549 pMedium->Close(); 1538 1550 } … … 1546 1558 p->mParent->i_saveModifiedRegistries(); 1547 1559 } 1560 else 1561 { 1562 for (std::map<Guid, DeviceType_T>::const_iterator it = uIdsForNotify.begin(); 1563 it != uIdsForNotify.end(); 1564 ++it) 1565 { 1566 p->mParent->i_onMediumRegistered(it->first, it->second, TRUE); 1567 } 1568 for (std::set<ComObjPtr<Medium> >::const_iterator it = pMediumsForNotify.begin(); 1569 it != pMediumsForNotify.end(); 1570 ++it) 1571 { 1572 if (it->isNotNull()) 1573 p->mParent->i_onMediumConfigChanged(*it); 1574 } 1575 } 1548 1576 1549 1577 return mrc;
Note:
See TracChangeset
for help on using the changeset viewer.