Changeset 94918 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 8, 2022 7:43:06 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151326
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r93166 r94918 128 128 129 129 VBOXGUESTCTRLHOSTCBCTX CtxCb = { idMessage, idContext }; 130 int rc = pGuest->i_dispatchToSession(&CtxCb, pSvcCb);131 132 Log2Func(("CID=%#x, idSession=%RU32, uObject=%RU32, uCount=%RU32, rc=%Rrc\n",130 int vrc = pGuest->i_dispatchToSession(&CtxCb, pSvcCb); 131 132 Log2Func(("CID=%#x, idSession=%RU32, uObject=%RU32, uCount=%RU32, vrc=%Rrc\n", 133 133 idContext, VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(idContext), VBOX_GUESTCTRL_CONTEXTID_GET_OBJECT(idContext), 134 VBOX_GUESTCTRL_CONTEXTID_GET_COUNT(idContext), rc));135 return rc;134 VBOX_GUESTCTRL_CONTEXTID_GET_COUNT(idContext), vrc)); 135 return vrc; 136 136 } 137 137 … … 163 163 GuestSessions::const_iterator itSession = mData.mGuestSessions.find(uSessionID); 164 164 165 int rc;165 int vrc; 166 166 if (itSession != mData.mGuestSessions.end()) 167 167 { … … 180 180 */ 181 181 bool fDispatch = true; 182 rc = VERR_INVALID_FUNCTION;182 vrc = VERR_INVALID_FUNCTION; 183 183 if ( pCtxCb->uMessage == GUEST_MSG_EXEC_STATUS 184 184 && pSvcCb->mParms >= 5) … … 205 205 { 206 206 case GUEST_MSG_DISCONNECTED: 207 rc = pSession->i_dispatchToThis(pCtxCb, pSvcCb);207 vrc = pSession->i_dispatchToThis(pCtxCb, pSvcCb); 208 208 break; 209 209 … … 213 213 case GUEST_MSG_EXEC_INPUT_STATUS: 214 214 case GUEST_MSG_EXEC_IO_NOTIFY: 215 rc = pSession->i_dispatchToObject(pCtxCb, pSvcCb);215 vrc = pSession->i_dispatchToObject(pCtxCb, pSvcCb); 216 216 break; 217 217 218 218 /* File stuff. */ 219 219 case GUEST_MSG_FILE_NOTIFY: 220 rc = pSession->i_dispatchToObject(pCtxCb, pSvcCb);220 vrc = pSession->i_dispatchToObject(pCtxCb, pSvcCb); 221 221 break; 222 222 223 223 /* Session stuff. */ 224 224 case GUEST_MSG_SESSION_NOTIFY: 225 rc = pSession->i_dispatchToThis(pCtxCb, pSvcCb);225 vrc = pSession->i_dispatchToThis(pCtxCb, pSvcCb); 226 226 break; 227 227 228 228 default: 229 rc = pSession->i_dispatchToObject(pCtxCb, pSvcCb);229 vrc = pSession->i_dispatchToObject(pCtxCb, pSvcCb); 230 230 break; 231 231 } … … 233 233 } 234 234 else 235 rc = VERR_INVALID_SESSION_ID;236 237 LogFlowFuncLeaveRC( rc);238 return rc;235 vrc = VERR_INVALID_SESSION_ID; 236 237 LogFlowFuncLeaveRC(vrc); 238 return vrc; 239 239 } 240 240 … … 258 258 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 259 259 260 int rc = VERR_MAX_PROCS_REACHED;260 int vrc = VERR_MAX_PROCS_REACHED; 261 261 if (mData.mGuestSessions.size() >= VBOX_GUESTCTRL_MAX_SESSIONS) 262 return rc;262 return vrc; 263 263 264 264 try … … 273 273 if (!i_sessionExists(uNewSessionID)) 274 274 { 275 rc = VINF_SUCCESS;275 vrc = VINF_SUCCESS; 276 276 break; 277 277 } … … 283 283 break; /* Don't try too hard. */ 284 284 } 285 if (RT_FAILURE( rc)) throwrc;285 if (RT_FAILURE(vrc)) throw vrc; 286 286 287 287 /* Create the session object. */ 288 HRESULT hr = pGuestSession.createObject();289 if (FAILED(hr )) throw VERR_COM_UNEXPECTED;288 HRESULT hrc = pGuestSession.createObject(); 289 if (FAILED(hrc)) throw VERR_COM_UNEXPECTED; 290 290 291 291 /** @todo Use an overloaded copy operator. Later. */ … … 310 310 } 311 311 312 rc = pGuestSession->init(this, startupInfo, guestCredentials);313 if (RT_FAILURE( rc)) throwrc;312 vrc = pGuestSession->init(this, startupInfo, guestCredentials); 313 if (RT_FAILURE(vrc)) throw vrc; 314 314 315 315 /* … … 324 324 ::FireGuestSessionRegisteredEvent(mEventSource, pGuestSession, true /* Registered */); 325 325 } 326 catch (int rc2)327 { 328 rc =rc2;329 } 330 331 LogFlowFuncLeaveRC( rc);332 return rc;326 catch (int vrc2) 327 { 328 vrc = vrc2; 329 } 330 331 LogFlowFuncLeaveRC(vrc); 332 return vrc; 333 333 } 334 334 … … 347 347 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 348 348 349 int rc = VERR_NOT_FOUND;349 int vrc = VERR_NOT_FOUND; 350 350 351 351 LogFlowThisFunc(("Destroying session (ID=%RU32) ...\n", uSessionID)); … … 362 362 uSessionID, mData.mGuestSessions.size() ? mData.mGuestSessions.size() - 1 : 0)); 363 363 364 rc = pSession->i_onRemove();364 vrc = pSession->i_onRemove(); 365 365 mData.mGuestSessions.erase(itSessions); 366 366 … … 370 370 pSession.setNull(); 371 371 372 LogFlowFuncLeaveRC( rc);373 return rc;372 LogFlowFuncLeaveRC(vrc); 373 return vrc; 374 374 } 375 375 … … 538 538 Assert(!pSession.isNull()); 539 539 540 int rcGuest = VERR_GSTCTL_GUEST_ERROR;541 vrc = pSession->i_startSession(& rcGuest);540 int vrcGuest = VERR_GSTCTL_GUEST_ERROR; 541 vrc = pSession->i_startSession(&vrcGuest); 542 542 if (RT_SUCCESS(vrc)) 543 543 { 544 vrc = pSession->i_shutdown(fFlags, & rcGuest);544 vrc = pSession->i_shutdown(fFlags, &vrcGuest); 545 545 if (RT_FAILURE(vrc)) 546 546 { … … 555 555 { 556 556 if (vrc == VERR_GSTCTL_GUEST_ERROR) 557 vrc = rcGuest;557 vrc = vrcGuest; 558 558 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Error %s guest: %Rrc"), strAction.c_str(), vrc); 559 559 break; … … 565 565 { 566 566 if (vrc == VERR_GSTCTL_GUEST_ERROR) 567 vrc = rcGuest;567 vrc = vrcGuest; 568 568 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Could not open guest session: %Rrc"), vrc); 569 569 } … … 638 638 Assert(!pSession.isNull()); 639 639 640 int rcGuest = VERR_GSTCTL_GUEST_ERROR;641 vrc = pSession->i_startSession(& rcGuest);640 int vrcGuest = VERR_GSTCTL_GUEST_ERROR; 641 vrc = pSession->i_startSession(&vrcGuest); 642 642 if (RT_SUCCESS(vrc)) 643 643 { … … 689 689 { 690 690 if (vrc == VERR_GSTCTL_GUEST_ERROR) 691 vrc = rcGuest;691 vrc = vrcGuest; 692 692 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Could not open guest session: %Rrc"), vrc); 693 693 }
Note:
See TracChangeset
for help on using the changeset viewer.