- Timestamp:
- Jan 10, 2022 5:45:55 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r93166 r93167 666 666 * was returned. Optional. 667 667 * 668 * @note Takes the writelock.668 * @note Takes the read lock. 669 669 */ 670 670 int GuestSession::i_closeSession(uint32_t uFlags, uint32_t uTimeoutMS, int *prcGuest) … … 674 674 LogFlowThisFunc(("uFlags=%x, uTimeoutMS=%RU32\n", uFlags, uTimeoutMS)); 675 675 676 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);676 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 677 677 678 678 /* Guest Additions < 4.3 don't support closing dedicated … … 713 713 LogFlowThisFunc(("Sending closing request to guest session ID=%RU32, uFlags=%x\n", 714 714 mData.mSession.mID, uFlags)); 715 716 alock.release(); 715 717 716 718 VBOXHGCMSVCPARM paParms[4]; … … 718 720 HGCMSvcSetU32(&paParms[i++], pEvent->ContextID()); 719 721 HGCMSvcSetU32(&paParms[i++], uFlags); 720 721 alock.release(); /* Drop the write lock before waiting. */722 722 723 723 vrc = i_sendMessage(HOST_MSG_SESSION_CLOSE, i, paParms, VBOX_GUESTCTRL_DST_BOTH); … … 1089 1089 * @param prcGuest Where to return the guest error when VERR_GSTCTL_GUEST_ERROR 1090 1090 * was returned. Optional. 1091 * 1092 * @note Takes the read lock. 1091 1093 */ 1092 1094 int GuestSession::i_directoryRemove(const Utf8Str &strPath, uint32_t fFlags, int *prcGuest) … … 1097 1099 LogFlowThisFunc(("strPath=%s, uFlags=0x%x\n", strPath.c_str(), fFlags)); 1098 1100 1099 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);1101 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1100 1102 1101 1103 GuestWaitEvent *pEvent = NULL; … … 1112 1114 HGCMSvcSetU32(&paParms[i++], fFlags); 1113 1115 1114 alock.release(); /* Drop writelock before sending. */1116 alock.release(); /* Drop lock before sending. */ 1115 1117 1116 1118 vrc = i_sendMessage(HOST_MSG_DIR_REMOVE, i, paParms); … … 1311 1313 * @param pCtxCb Host callback context. 1312 1314 * @param pSvcCb Service callback data. 1315 * 1316 * @note Takes the read lock. 1313 1317 */ 1314 1318 int GuestSession::i_dispatchToObject(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) … … 1959 1963 * Called by IGuest right before this session gets removed from 1960 1964 * the public session list. 1965 * 1966 * @note Takes the write lock. 1961 1967 */ 1962 1968 int GuestSession::i_onRemove(void) … … 2141 2147 * @param prcGuest Where to return the guest error when VERR_GSTCTL_GUEST_ERROR 2142 2148 * was returned. Optional. 2149 * 2150 * @note Takes the write lock. 2143 2151 */ 2144 2152 int GuestSession::i_startSession(int *prcGuest) … … 2167 2175 /* Set current session status. */ 2168 2176 mData.mStatus = GuestSessionStatus_Starting; 2169 mData.mRC = VINF_SUCCESS; /* Clear previous error, if any. */2177 mData.mRC = VINF_SUCCESS; /* Clear previous error, if any. */ 2170 2178 2171 2179 int vrc; … … 2200 2208 HGCMSvcSetU32(&paParms[i++], mData.mSession.mOpenFlags); 2201 2209 2202 alock.release(); /* Drop writelock before sending. */2210 alock.release(); /* Drop lock before sending. */ 2203 2211 2204 2212 vrc = i_sendMessage(HOST_MSG_SESSION_CREATE, i, paParms, VBOX_GUESTCTRL_DST_ROOT_SVC); … … 2211 2219 else 2212 2220 { 2221 alock.acquire(); /* Re-aquire lock before changing status. */ 2222 2213 2223 /* 2214 2224 * Unable to start guest session - update its current state. … … 2356 2366 * @retval VERR_NOT_FOUND if the object ID was not found. 2357 2367 * @param idObject Object ID to unregister. 2368 * 2369 * @note Takes the write lock. 2358 2370 */ 2359 2371 int GuestSession::i_objectUnregister(uint32_t idObject) … … 2469 2481 * @param prcGuest Where to return the guest error when VERR_GSTCTL_GUEST_ERROR 2470 2482 * was returned. Optional. 2471 * @note Takes the writelock.2483 * @note Takes the read lock. 2472 2484 */ 2473 2485 int GuestSession::i_pathRename(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *prcGuest) … … 2478 2490 strSource.c_str(), strDest.c_str(), uFlags)); 2479 2491 2480 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);2492 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2481 2493 2482 2494 GuestWaitEvent *pEvent = NULL; … … 2495 2507 HGCMSvcSetU32(&paParms[i++], uFlags); 2496 2508 2497 alock.release(); /* Drop writelock before sending. */2509 alock.release(); /* Drop lock before sending. */ 2498 2510 2499 2511 vrc = i_sendMessage(HOST_MSG_PATH_RENAME, i, paParms); … … 2520 2532 * Any other return code indicates some host side error. 2521 2533 * 2522 * @note Takes the writelock.2534 * @note Takes the read lock. 2523 2535 */ 2524 2536 int GuestSession::i_pathUserDocuments(Utf8Str &strPath, int *prcGuest) 2525 2537 { 2526 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);2538 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2527 2539 2528 2540 /** @todo Cache the user's document path? */ … … 2538 2550 HGCMSvcSetU32(&paParms[i++], pEvent->ContextID()); 2539 2551 2540 alock.release(); /* Drop writelock before sending. */2552 alock.release(); /* Drop lock before sending. */ 2541 2553 2542 2554 vrc = i_sendMessage(HOST_MSG_PATH_USER_DOCUMENTS, i, paParms); … … 2572 2584 * Any other return code indicates some host side error. 2573 2585 * 2574 * @note Takes the writelock.2586 * @note Takes the read lock. 2575 2587 */ 2576 2588 int GuestSession::i_pathUserHome(Utf8Str &strPath, int *prcGuest) 2577 2589 { 2578 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);2590 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2579 2591 2580 2592 /** @todo Cache the user's home path? */ … … 2590 2602 HGCMSvcSetU32(&paParms[i++], pEvent->ContextID()); 2591 2603 2592 alock.release(); /* Drop writelock before sending. */2604 alock.release(); /* Drop lock before sending. */ 2593 2605 2594 2606 vrc = i_sendMessage(HOST_MSG_PATH_USER_HOME, i, paParms); … … 2957 2969 * Any other return code indicates some host side error. 2958 2970 * 2959 * @note Takes the writelock.2971 * @note Takes the read lock. 2960 2972 */ 2961 2973 int GuestSession::i_shutdown(uint32_t fFlags, int *prcGuest) 2962 2974 { 2963 Auto WriteLock alock(this COMMA_LOCKVAL_SRC_POS);2975 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2964 2976 2965 2977 AssertPtrReturn(mParent, VERR_INVALID_POINTER); … … 2980 2992 HGCMSvcSetU32(&paParms[i++], fFlags); 2981 2993 2982 alock.release(); /* Drop writelock before sending. */2994 alock.release(); /* Drop lock before sending. */ 2983 2995 2984 2996 int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
Note:
See TracChangeset
for help on using the changeset viewer.