VirtualBox

Ignore:
Timestamp:
Sep 2, 2020 2:43:13 PM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Host Service: Use and check for a context ID (CID) in ShClSvcGuestDataRequest() / shClSvcClientWriteData() for old(er) Guest Additions. Untested. bugref:9437 [Forgot files; build fix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp

    r85986 r86000  
    3535
    3636
     37/*********************************************************************************************************************************
     38*   Prototypes                                                                                                                   *
     39*********************************************************************************************************************************/
     40DECLINLINE(PSHCLEVENT) shclEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent);
     41
     42
     43/*********************************************************************************************************************************
     44*   Implementation                                                                                                               *
     45*********************************************************************************************************************************/
     46
    3747/**
    3848 * Allocates a new event payload.
     
    178188        pEvIt = NULL;
    179189    }
    180 }
    181 
    182 /**
    183  * Returns a specific event of a event source.
    184  *
    185  * @returns Pointer to event if found, or NULL if not found.
    186  * @param   pSource             Event source to get event from.
    187  * @param   uID                 Event ID to get.
    188  */
    189 DECLINLINE(PSHCLEVENT) shclEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent)
    190 {
    191     PSHCLEVENT pEvent;
    192     RTListForEach(&pSource->lstEvents, pEvent, SHCLEVENT, Node)
    193     {
    194         if (pEvent->idEvent == idEvent)
    195             return pEvent;
    196     }
    197 
    198     return NULL;
    199190}
    200191
     
    244235    RTMemFree(pEvent);
    245236    return NIL_SHCLEVENTID;
     237}
     238
     239/**
     240 * Returns a specific event of a event source. Inlined version.
     241 *
     242 * @returns Pointer to event if found, or NULL if not found.
     243 * @param   pSource             Event source to get event from.
     244 * @param   uID                 Event ID to get.
     245 */
     246DECLINLINE(PSHCLEVENT) shclEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent)
     247{
     248    PSHCLEVENT pEvent;
     249    RTListForEach(&pSource->lstEvents, pEvent, SHCLEVENT, Node)
     250    {
     251        if (pEvent->idEvent == idEvent)
     252            return pEvent;
     253    }
     254
     255    return NULL;
     256}
     257
     258/**
     259 * Returns a specific event of a event source.
     260 *
     261 * @returns Pointer to event if found, or NULL if not found.
     262 * @param   pSource             Event source to get event from.
     263 * @param   uID                 Event ID to get.
     264 */
     265PSHCLEVENT ShClEventGet(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent)
     266{
     267    return shclEventGet(pSource, idEvent);
    246268}
    247269
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