From 12b0b9ea28bc30ccb82ed67299647f96b6aee618 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 2 Sep 2019 15:28:31 +0200 Subject: [PATCH] Do not use named events, they are global! --- channels/rdpsnd/client/rdpsnd_main.c | 2 +- channels/rdpsnd/client/winmm/rdpsnd_winmm.c | 2 +- client/Windows/wf_cliprdr.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 477b55323..4284ab218 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -1064,7 +1064,7 @@ static void rdpsnd_queue_free(void* data) static UINT rdpsnd_virtual_channel_event_initialized(rdpsndPlugin* rdpsnd, LPVOID pData, UINT32 dataLength) { - rdpsnd->stopEvent = CreateEventA(NULL, TRUE, FALSE, "rdpsnd->stopEvent"); + rdpsnd->stopEvent = CreateEventA(NULL, TRUE, FALSE, NULL); if (!rdpsnd->stopEvent) goto fail; diff --git a/channels/rdpsnd/client/winmm/rdpsnd_winmm.c b/channels/rdpsnd/client/winmm/rdpsnd_winmm.c index e610ed855..0d8ab3261 100644 --- a/channels/rdpsnd/client/winmm/rdpsnd_winmm.c +++ b/channels/rdpsnd/client/winmm/rdpsnd_winmm.c @@ -301,7 +301,7 @@ UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS p winmm->device.Close = rdpsnd_winmm_close; winmm->device.Free = rdpsnd_winmm_free; winmm->log = WLog_Get(TAG); - winmm->playedEvent = CreateEventA(NULL, FALSE, FALSE, "winmm::sample_played"); + winmm->playedEvent = CreateEventA(NULL, FALSE, FALSE, NULL); args = pEntryPoints->args; rdpsnd_winmm_parse_addin_args((rdpsndDevicePlugin*) winmm, args); diff --git a/client/Windows/wf_cliprdr.c b/client/Windows/wf_cliprdr.c index 3dac8e63c..da6430286 100644 --- a/client/Windows/wf_cliprdr.c +++ b/client/Windows/wf_cliprdr.c @@ -2518,12 +2518,10 @@ BOOL wf_cliprdr_init(wfContext* wfc, CliprdrClientContext* cliprdr) sizeof(formatMapping)))) goto error; - if (!(clipboard->response_data_event = CreateEvent(NULL, TRUE, FALSE, - _T("response_data_event")))) + if (!(clipboard->response_data_event = CreateEvent(NULL, TRUE, FALSE, NULL))) goto error; - if (!(clipboard->req_fevent = CreateEvent(NULL, TRUE, FALSE, - _T("request_filecontents_event")))) + if (!(clipboard->req_fevent = CreateEvent(NULL, TRUE, FALSE, NULL))) goto error; if (!(clipboard->thread = CreateThread(NULL, 0, cliprdr_thread_func, clipboard, 0, NULL)))