VirtualBox

忽略:
時間撮記:
2013-10-31 下午04:40:46 (11 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
90367
訊息:

Guest Control:

  • Implemented IGuestSession::DirectoryRemove, IGuestSession::DirectoryRemoveRecursive, IGuestSession::DirectoryRename + IGuestSession::FileRename.
  • Added appropriate commands to VBoxManage (basic support for now).
  • Implemented support for proper guest session process termination via SCM.
  • Implemented support for internal anonymous wait events which are not relying on the public API's VBoxEventType_T.
  • Various bugfixes.
檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r48724 r49349  
    388388        if (mParmCount > pConnection->mNumParms)
    389389        {
     390            LogFlowFunc(("pHostCmd=%p requires %RU32 parms, only got %RU32 from client\n",
     391                         this, mParmCount, pConnection->mNumParms));
     392
    390393            /*
    391394            * So this call apparently failed because the guest wanted to peek
     
    766769                     mID, rcPending, mIsPending, mPendingCon.mNumParms, mFlags));
    767770
     771        int rc;
    768772        if (   mIsPending
    769773            && mPendingCon.mNumParms >= 2)
     
    776780
    777781            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;
    781791    }
    782792
     
    10151025    void call(VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    10161026    int hostCall(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     1027    int sessionClose(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    10171028    int uninit(void);
    10181029};
     
    13061317
    13071318/**
    1308  * Processes a command receiveed from the host side and re-routes it to
     1319 * Processes a command received from the host side and re-routes it to
    13091320 * a connect client on the guest.
    13101321 *
     
    14501461                    LogFlowFunc(("[Client %RU32] GUEST_MSG_SKIP\n", u32ClientID));
    14511462                    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);
    14521472                    break;
    14531473
     
    15221542}
    15231543
     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 */
     1553int 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
    15241573int Service::uninit()
    15251574{
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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