Changeset 37604 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 23, 2011 8:38:23 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r37603 r37604 621 621 if (FAILED(rc)) throw rc; 622 622 623 srcLock.release(); 623 624 /* Do the disk cloning. */ 624 625 ComPtr<IProgress> progress2; … … 630 631 631 632 /* Wait until the asynchrony process has finished. */ 632 srcLock.release();633 633 rc = d->pProgress->WaitForAsyncProgressCompletion(progress2); 634 634 srcLock.acquire(); … … 657 657 map.insert(TStrMediumPair(Utf8Str(bstrSrcId), pTarget)); 658 658 /* Global register the new harddisk */ 659 rc = p->mParent->registerHardDisk(pTarget, NULL /* pllRegistriesThatNeedSaving */); 660 if (FAILED(rc)) return rc; 659 { 660 AutoWriteLock tlock(p->mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 661 rc = p->mParent->registerHardDisk(pTarget, NULL /* pllRegistriesThatNeedSaving */); 662 if (FAILED(rc)) return rc; 663 } 661 664 /* This medium becomes the parent of the next medium in the 662 665 * chain. */ … … 697 700 newMedias.append(diff); 698 701 /* Global register the new harddisk */ 699 rc = p->mParent->registerHardDisk(diff, NULL /* pllRegistriesThatNeedSaving */); 700 if (FAILED(rc)) return rc; 702 { 703 AutoWriteLock tlock(p->mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 704 rc = p->mParent->registerHardDisk(diff, NULL /* pllRegistriesThatNeedSaving */); 705 if (FAILED(rc)) return rc; 706 } 701 707 /* This medium becomes the parent of the next medium in the 702 708 * chain. */
Note:
See TracChangeset
for help on using the changeset viewer.