VirtualBox

Changeset 40748 in vbox


Ignore:
Timestamp:
Apr 2, 2012 6:34:25 PM (12 years ago)
Author:
vboxsync
Message:

Main/Metrics: added read lock to Session::EnableVMMStatistics (#6029)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/SessionImpl.cpp

    r40257 r40748  
    840840    AutoCaller autoCaller(this);
    841841    AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
     842
     843    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     844    AssertReturn(mState == SessionState_Locked, VBOX_E_INVALID_VM_STATE);
     845    AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE);
    842846
    843847    mConsole->enableVMMStatistics(aEnable);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette