VirtualBox

Ignore:
Timestamp:
Sep 1, 2020 5:46:22 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140181
Message:

Shared Clipboard/Host Service: Automatically unregister event if it has no (more) references in ShClSvcGuestDataReceived(). bugref:9437

File:
1 edited

Legend:

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

    r85864 r85985  
    259259        return pEvent->idEvent;
    260260
     261    return 0;
     262}
     263
     264/**
     265 * Returns the current reference count for a specific event.
     266 *
     267 * @returns Reference count.
     268 * @param   pSource             Event source the specific event is part of.
     269 * @param   idEvent             Event ID to return reference count for.
     270 */
     271uint32_t ShClEventGetRefs(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent)
     272{
     273    PSHCLEVENT pEvent = shclEventGet(pSource, idEvent);
     274    if (pEvent)
     275        return pEvent->cRefs;
     276
     277    AssertMsgFailed(("No event with %RU32\n", idEvent));
    261278    return 0;
    262279}
Note: See TracChangeset for help on using the changeset viewer.

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