VirtualBox

Changeset 81444 in vbox for trunk


Ignore:
Timestamp:
Oct 22, 2019 9:57:20 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134162
Message:

Shared Clipboard/Svc: Split up client initialization / resetting code into own functions for better testing coverage [build fix].

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/SharedClipboard.h

    r81346 r81444  
    196196int ShClEventSourceCreate(PSHCLEVENTSOURCE pSource, SHCLEVENTSOURCEID uID);
    197197void ShClEventSourceDestroy(PSHCLEVENTSOURCE pSource);
     198void ShClEventSourceReset(PSHCLEVENTSOURCE pSource);
    198199/** @} */
    199200
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp

    r81352 r81444  
    176176    LogFlowFunc(("ID=%RU32\n", pSource->uID));
    177177
     178    ShClEventSourceReset(pSource);
     179
     180    pSource->uID          = 0;
     181    pSource->uEventIDNext = 0;
     182}
     183
     184/**
     185 * Resets an event source.
     186 *
     187 * @param   pSource             Event source to reset.
     188 */
     189void ShClEventSourceReset(PSHCLEVENTSOURCE pSource)
     190{
     191    LogFlowFunc(("ID=%RU32\n", pSource->uID));
     192
    178193    PSHCLEVENT pEvIt;
    179194    PSHCLEVENT pEvItNext;
     
    187202        pEvIt = NULL;
    188203    }
    189 
    190     pSource->uID          = 0;
    191     pSource->uEventIDNext = 0;
    192204}
    193205
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