VirtualBox

Ignore:
Timestamp:
Aug 13, 2020 11:18:00 AM (4 years ago)
Author:
vboxsync
Message:

DnD/HostService: Guest reboot / shutdown fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.cpp

    r85745 r85749  
    103103    int  clientConnect(uint32_t idClient, void *pvClient) RT_NOEXCEPT RT_OVERRIDE;
    104104    int  clientDisconnect(uint32_t idClient, void *pvClient) RT_NOEXCEPT RT_OVERRIDE;
    105     int  clientQueryFeatures(DragAndDropClient *pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT;
    106     int  clientReportFeatures(DragAndDropClient *pClient, VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT;
     105    int  clientQueryFeatures(uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT;
     106    int  clientReportFeatures(DragAndDropClient *pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT;
    107107    void guestCall(VBOXHGCMCALLHANDLE callHandle, uint32_t idClient, void *pvClient, uint32_t u32Function,
    108108                   uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT RT_OVERRIDE;
     
    307307 *
    308308 * @param   pClient     The client state.
    309  * @param   hCall       The client's call handle.
    310309 * @param   cParms      Number of parameters.
    311310 * @param   paParms     Array of parameters.
    312311 */
    313 int DragAndDropService::clientReportFeatures(DragAndDropClient *pClient,
    314                                              VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT
    315 {
     312int DragAndDropService::clientReportFeatures(DragAndDropClient *pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT
     313{
     314    RT_NOREF(pClient);
     315
    316316    /*
    317317     * Validate the request.
     
    325325
    326326    /*
    327      * Do the work.
     327     * Report back the host features.
    328328     */
    329329    paParms[0].u.uint64 = m_fHostFeatures0;
    330330    paParms[1].u.uint64 = 0;
    331331
    332     int rc = pClient->Complete(hCall, VINF_SUCCESS);
    333     if (RT_SUCCESS(rc))
    334     {
    335         pClient->fGuestFeatures0 = fFeatures0;
    336         pClient->fGuestFeatures1 = fFeatures1;
    337         Log(("[Client %RU32] features: %#RX64 %#RX64\n", pClient->GetClientID(), fFeatures0, fFeatures1));
    338     }
    339     else
    340         LogFunc(("pfnCallComplete -> %Rrc\n", rc));
    341 
    342     return VINF_HGCM_ASYNC_EXECUTE;
     332    pClient->fGuestFeatures0 = fFeatures0;
     333    pClient->fGuestFeatures1 = fFeatures1;
     334
     335    Log(("[Client %RU32] features: %#RX64 %#RX64\n", pClient->GetClientID(), fFeatures0, fFeatures1));
     336
     337    return VINF_SUCCESS;
    343338}
    344339
     
    350345 * @retval  VERR_WRONG_PARAMETER_COUNT
    351346 *
    352  * @param   pClient     The client state.
    353  * @param   hCall       The client's call handle.
    354347 * @param   cParms      Number of parameters.
    355348 * @param   paParms     Array of parameters.
    356349 */
    357 int DragAndDropService::clientQueryFeatures(DragAndDropClient *pClient,
    358                                             VBOXHGCMCALLHANDLE hCall, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT
     350int DragAndDropService::clientQueryFeatures(uint32_t cParms, VBOXHGCMSVCPARM paParms[]) RT_NOEXCEPT
    359351{
    360352    /*
     
    367359
    368360    /*
    369      * Do the work.
     361     * Report back the host features.
    370362     */
    371363    paParms[0].u.uint64 = m_fHostFeatures0;
    372364    paParms[1].u.uint64 = 0;
    373365
    374     int rc = pClient->Complete(hCall, VINF_SUCCESS);
    375     if (RT_FAILURE(rc))
    376         LogFunc(("pfnCallComplete -> %Rrc\n", rc));
    377 
    378     return VINF_HGCM_ASYNC_EXECUTE;
     366    return VINF_SUCCESS;
    379367}
    380368
     
    638626            {
    639627                LogFlowFunc(("GUEST_DND_FN_REPORT_FEATURES\n"));
    640                 rc = clientReportFeatures(pClient, callHandle, cParms, paParms);
     628                rc = clientReportFeatures(pClient, cParms, paParms);
    641629                if (RT_SUCCESS(rc))
    642630                {
     
    657645            {
    658646                LogFlowFunc(("GUEST_DND_FN_QUERY_FEATURES"));
    659                 rc = clientQueryFeatures(pClient, callHandle, cParms, paParms);
     647                rc = clientQueryFeatures(cParms, paParms);
    660648                break;
    661649            }
     
    10531041    }
    10541042    else if (pClient)
     1043    {
     1044        /* Complete the call on the guest side. */
    10551045        pClient->Complete(callHandle, rc);
     1046    }
    10561047    else
    10571048    {
Note: See TracChangeset for help on using the changeset viewer.

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