- 時間撮記:
- 2013-10-31 下午04:40:46 (11 年 以前)
- svn:sync-xref-src-repo-rev:
- 90367
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r48724 r49349 388 388 if (mParmCount > pConnection->mNumParms) 389 389 { 390 LogFlowFunc(("pHostCmd=%p requires %RU32 parms, only got %RU32 from client\n", 391 this, mParmCount, pConnection->mNumParms)); 392 390 393 /* 391 394 * So this call apparently failed because the guest wanted to peek … … 766 769 mID, rcPending, mIsPending, mPendingCon.mNumParms, mFlags)); 767 770 771 int rc; 768 772 if ( mIsPending 769 773 && mPendingCon.mNumParms >= 2) … … 776 780 777 781 mIsPending = false; 778 } 779 780 return VINF_SUCCESS; 782 783 rc = VINF_SUCCESS; 784 } 785 else if (mPendingCon.mNumParms < 2) 786 rc = VERR_BUFFER_OVERFLOW; 787 else /** @todo Enqueue command instead of dropping? */ 788 rc = VERR_WRONG_ORDER; 789 790 return rc; 781 791 } 782 792 … … 1015 1025 void call(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 1016 1026 int hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 1027 int sessionClose(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 1017 1028 int uninit(void); 1018 1029 }; … … 1306 1317 1307 1318 /** 1308 * Processes a command receive ed from the host side and re-routes it to1319 * Processes a command received from the host side and re-routes it to 1309 1320 * a connect client on the guest. 1310 1321 * … … 1450 1461 LogFlowFunc(("[Client %RU32] GUEST_MSG_SKIP\n", u32ClientID)); 1451 1462 rc = clientSkipMsg(u32ClientID, callHandle, cParms, paParms); 1463 break; 1464 1465 /* 1466 * The guest wants to close specific guest session. This is handy for 1467 * shutting down dedicated guest session processes from another process. 1468 */ 1469 case GUEST_SESSION_CLOSE: 1470 LogFlowFunc(("[Client %RU32] GUEST_SESSION_CLOSE\n", u32ClientID)); 1471 rc = sessionClose(u32ClientID, callHandle, cParms, paParms); 1452 1472 break; 1453 1473 … … 1522 1542 } 1523 1543 1544 /** 1545 * Client asks another client (guest) session to close. 1546 * 1547 * @return IPRT status code. 1548 * @param u32ClientID The client's ID. 1549 * @param callHandle The client's call handle. 1550 * @param cParms Number of parameters. 1551 * @param paParms Array of parameters. 1552 */ 1553 int Service::sessionClose(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 1554 { 1555 if (cParms < 2) 1556 return VERR_INVALID_PARAMETER; 1557 1558 uint32_t uContextID, uFlags; 1559 int rc = paParms[0].getUInt32(&uContextID); 1560 if (RT_SUCCESS(rc)) 1561 rc = paParms[1].getUInt32(&uFlags); 1562 1563 uint32_t uSessionID = VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(uContextID); 1564 1565 if (RT_SUCCESS(rc)) 1566 rc = hostProcessCommand(HOST_SESSION_CLOSE, cParms, paParms); 1567 1568 LogFlowFunc(("Closing guest session ID=%RU32 (from client ID=%RU32) returned with rc=%Rrc\n", 1569 uSessionID, u32ClientID, rc)); 1570 return rc; 1571 } 1572 1524 1573 int Service::uninit() 1525 1574 {
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器