Changeset 26042 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 26, 2010 11:14:03 AM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r25998 r26042 2984 2984 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2985 2985 2986 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2986 // we're calling host methods for getting DVD and floppy drives so lock host first 2987 AutoMultiWriteLock2 alock(mParent->host(), this COMMA_LOCKVAL_SRC_POS); 2987 2988 2988 2989 ComObjPtr<MediumAttachment> pAttach = findAttachment(mMediaData->mAttachments, -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r25903 r26042 1438 1438 1439 1439 /** @note Doesn't lock anything. */ 1440 STDMETHODIMP VirtualBox::OpenDVDImage 1441 1440 STDMETHODIMP VirtualBox::OpenDVDImage(IN_BSTR aLocation, IN_BSTR aId, 1441 IMedium **aDVDImage) 1442 1442 { 1443 1443 CheckComArgStrNotEmptyOrNull(aLocation); … … 1456 1456 ComObjPtr<Medium> image; 1457 1457 image.createObject(); 1458 rc = image->init 1458 rc = image->init(this, aLocation, Medium::OpenReadOnly, DeviceType_DVD, true, id, false, Guid()); 1459 1459 if (SUCCEEDED(rc)) 1460 1460 { 1461 AutoWriteLock treeLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 1461 1462 bool fNeedsSaveSettings = false; 1462 1463 rc = registerImage(image, DeviceType_DVD, &fNeedsSaveSettings); 1464 treeLock.release(); 1463 1465 1464 1466 if (SUCCEEDED(rc)) … … 1533 1535 if (SUCCEEDED(rc)) 1534 1536 { 1537 AutoWriteLock treeLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 1535 1538 bool fNeedsSaveSettings = false; 1536 1539 rc = registerImage(image, DeviceType_Floppy, &fNeedsSaveSettings); 1540 treeLock.release(); 1537 1541 1538 1542 if (SUCCEEDED(rc))
Note:
See TracChangeset
for help on using the changeset viewer.