- Timestamp:
- Jan 10, 2022 6:00:59 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r93167 r93168 2148 2148 * was returned. Optional. 2149 2149 * 2150 * @note Takes the write lock.2150 * @note Takes the read and write locks. 2151 2151 */ 2152 2152 int GuestSession::i_startSession(int *prcGuest) 2153 2153 { 2154 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);2154 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2155 2155 2156 2156 LogFlowThisFunc(("mID=%RU32, mName=%s, uProtocolVersion=%RU32, openFlags=%x, openTimeoutMS=%RU32\n", … … 2162 2162 if (mData.mProtocolVersion < 2) 2163 2163 { 2164 mData.mStatus = GuestSessionStatus_Started; 2165 2164 alock.release(); /* Release lock before changing status. */ 2165 2166 /* ignore rc */ i_setSessionStatus(GuestSessionStatus_Started, VINF_SUCCESS); 2166 2167 LogFlowThisFunc(("Installed Guest Additions don't support opening dedicated sessions, skipping\n")); 2167 2168 return VINF_SUCCESS; … … 2173 2174 /** @todo mData.mSession.uFlags validation. */ 2174 2175 2176 alock.release(); /* Release lock before changing status. */ 2177 2175 2178 /* Set current session status. */ 2176 mData.mStatus = GuestSessionStatus_Starting; 2177 mData.mRC = VINF_SUCCESS; /* Clear previous error, if any. */ 2178 2179 int vrc; 2179 int vrc = i_setSessionStatus(GuestSessionStatus_Starting, VINF_SUCCESS); 2180 if (RT_FAILURE(vrc)) 2181 return vrc; 2180 2182 2181 2183 GuestWaitEvent *pEvent = NULL; … … 2194 2196 if (RT_FAILURE(vrc)) 2195 2197 return vrc; 2198 2199 alock.acquire(); /* Re-acquire lock before accessing session attributes below. */ 2196 2200 2197 2201 VBOXHGCMSVCPARM paParms[8]; … … 2219 2223 else 2220 2224 { 2221 alock.acquire(); /* Re-aquire lock before changing status. */2222 2223 2225 /* 2224 2226 * Unable to start guest session - update its current state. … … 2227 2229 * same function again will work though. 2228 2230 */ 2229 mData.mStatus = GuestSessionStatus_Error; 2230 mData.mRC = vrc; 2231 /* ignore rc */ i_setSessionStatus(GuestSessionStatus_Error, vrc); 2231 2232 } 2232 2233
Note:
See TracChangeset
for help on using the changeset viewer.