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