- Timestamp:
- Apr 2, 2009 7:26:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r18572 r18621 7445 7445 rc = hd->LockWrite (NULL); 7446 7446 AssertComRC (rc); 7447 7448 mData->mSession.mLockedMedia.push_back ( 7449 Data::Session::LockedMedia::value_type ( 7450 ComPtr <IHardDisk> (hd), true)); 7447 7451 7448 7452 /* also, relock the old hard disk which is a base for the … … 7456 7460 rc = parent->LockRead (NULL); 7457 7461 AssertComRC (rc); 7462 7463 /* XXX actually we should replace the old entry in that 7464 * vector (write lock => read lock) but this would take 7465 * some effort. So lets just ignore the error code in 7466 * SessionMachine::unlockMedia(). */ 7467 mData->mSession.mLockedMedia.push_back ( 7468 Data::Session::LockedMedia::value_type ( 7469 ComPtr <IHardDisk> (parent), false)); 7458 7470 } 7459 7471 … … 11076 11088 it != mData->mSession.mLockedMedia.end(); ++ it) 11077 11089 { 11090 MediaState_T state; 11078 11091 if (it->second) 11079 rc = it->first->UnlockWrite ( NULL);11092 rc = it->first->UnlockWrite (&state); 11080 11093 else 11081 rc = it->first->UnlockRead (NULL); 11082 11083 AssertComRC (rc); 11094 rc = it->first->UnlockRead (&state); 11095 11096 /* the latter can happen if an object was re-locked in 11097 * Machine::fixupHardDisks() */ 11098 Assert (SUCCEEDED (rc) || state == MediaState_LockedRead); 11084 11099 } 11085 11100
Note:
See TracChangeset
for help on using the changeset viewer.