VirtualBox

Changeset 100619 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Jul 18, 2023 8:06:24 AM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158450
Message:

Shared Clipboard: Made the Main host service dispatcher a bit more flexible so that it returns VERR_NOT_SUPPORTED if certain commands are not being handled. See comment(s) for details. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestShClPrivate.cpp

    r100616 r100619  
    221221 *
    222222 * @returns VBox status code.
     223 * @retval  VERR_NOT_SUPPORTED if the extension didn't handle the requested function. This will invoke the regular backend then.
    223224 * @param   pvExtension         Pointer to service extension.
    224225 * @param   u32Function         Callback HGCM message ID.
     
    239240    /* pParms might be NULL, depending on the message. */
    240241
    241     int vrc = VINF_SUCCESS;
     242    int vrc;
    242243
    243244    switch (u32Function)
     
    250251
    251252        default:
     253            vrc = VERR_NOT_SUPPORTED;
    252254            break;
    253255    }
     
    255257    PSHCLSVCEXT const pExt = &pThis->m_SvcExtVRDP; /* Currently we have one extension only. */
    256258
    257     if (pExt->pfnExt)
    258     {
    259         int vrc2 = pExt->pfnExt(pExt->pvExt, u32Function, pvParms, cbParms);
    260         if (RT_SUCCESS(vrc))
    261             vrc = vrc2;
    262     }
     259    if (pExt->pfnExt) /* Overwrite rc if we have an extension present. */
     260        vrc = pExt->pfnExt(pExt->pvExt, u32Function, pvParms, cbParms);
    263261
    264262    LogFlowFuncLeaveRC(vrc);
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