- Timestamp:
- Mar 16, 2012 5:05:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r40487 r40506 5408 5408 * of the method), then queryInfoSem, and below the other way round. */ 5409 5409 AutoWriteLock qlock(m->queryInfoSem COMMA_LOCKVAL_SRC_POS); 5410 alock.acquire();5411 5410 5412 5411 try … … 5446 5445 if (fSetImageId) 5447 5446 { 5447 alock.acquire(); 5448 5448 vrc = VDSetUuid(hdd, 0, m->uuidImage.raw()); 5449 alock.release(); 5449 5450 ComAssertRCThrow(vrc, E_FAIL); 5450 5451 mediumId = m->uuidImage; … … 5452 5453 if (fSetParentId) 5453 5454 { 5455 alock.acquire(); 5454 5456 vrc = VDSetParentUuid(hdd, 0, m->uuidParentImage.raw()); 5457 alock.release(); 5455 5458 ComAssertRCThrow(vrc, E_FAIL); 5456 5459 } 5457 5460 /* zap the information, these are no long-term members */ 5461 alock.acquire(); 5458 5462 unconst(m->uuidImage).clear(); 5459 5463 unconst(m->uuidParentImage).clear(); 5464 alock.release(); 5460 5465 5461 5466 /* check the UUID */ … … 5497 5502 { 5498 5503 /* set the UUID if an API client wants to change it */ 5504 alock.acquire(); 5499 5505 mediumId = m->uuidImage; 5506 alock.release(); 5500 5507 } 5501 5508 else if (isImport) … … 5510 5517 vrc = VDGetImageFlags(hdd, 0, &uImageFlags); 5511 5518 ComAssertRCThrow(vrc, E_FAIL); 5519 alock.acquire(); 5512 5520 m->variant = (MediumVariant_T)uImageFlags; 5521 alock.release(); 5513 5522 5514 5523 /* check/get the parent uuid and update corresponding state */ … … 5547 5556 5548 5557 /* we set mParent & children() */ 5549 alock.release();5550 5558 treeLock.acquire(); 5551 5559 … … 5555 5563 5556 5564 treeLock.release(); 5557 alock.acquire();5558 5565 } 5559 5566 else 5560 5567 { 5561 5568 /* we access mParent */ 5562 alock.release();5563 5569 treeLock.acquire(); 5564 5570 … … 5585 5591 m->pVirtualBox->settingsFilePath().c_str()); 5586 5592 treeLock.release(); 5587 alock.acquire();5588 5593 throw S_OK; 5589 5594 #endif /* 0 */ … … 5604 5609 parentLock.release(); 5605 5610 treeLock.release(); 5606 alock.acquire();5607 5611 throw S_OK; 5608 5612 } … … 5614 5618 5615 5619 treeLock.release(); 5616 alock.acquire();5617 5620 } 5618 5621 } … … 5642 5645 } 5643 5646 5644 alock.release();5645 5647 treeLock.acquire(); 5646 5648 alock.acquire();
Note:
See TracChangeset
for help on using the changeset viewer.