Changeset 28582 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 22, 2010 8:09:21 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60412
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumLock.cpp
r28556 r28582 50 50 HRESULT MediumLock::UpdateLock(bool aLockWrite) 51 51 { 52 if (mIsLocked) 53 return VBOX_E_INVALID_OBJECT_STATE; 52 if (aLockWrite == mLockWrite) 53 return S_OK; 54 if (mIsLocked) 55 { 56 HRESULT rc = Unlock(); 57 if (FAILED(rc)) 58 { 59 Lock(); 60 return rc; 61 } 62 mLockWrite = aLockWrite; 63 rc = Lock(); 64 if (FAILED(rc)) 65 { 66 mLockWrite = !mLockWrite; 67 Lock(); 68 return rc; 69 } 70 return S_OK; 71 } 72 54 73 mLockWrite = aLockWrite; 55 74 return S_OK; -
trunk/src/VBox/Main/include/MediumLock.h
r28556 r28582 74 74 75 75 /** 76 * Update a medium lock description 77 * 78 * @note May be only used in unlocked state.76 * Update a medium lock description. 77 * 78 * @note May be used in locked state. 79 79 * 80 80 * @return COM status code … … 190 190 191 191 /** 192 * Clear all medium lock declaration .192 * Clear all medium lock declarations. 193 193 * 194 194 * @note Implicitly unlocks all locks.
Note:
See TracChangeset
for help on using the changeset viewer.