From 8d49175a9490507961a31a630e2bed6ba55c4107 Mon Sep 17 00:00:00 2001 From: Martin Fleisz Date: Wed, 23 Feb 2022 16:14:55 +0100 Subject: [PATCH] Revert "drdynvc: Prevent opening an already opened dynamic channel" This reverts commit feda57a739dc81d8dbe1b56ae132cb358e1276b9. --- channels/drdynvc/client/drdynvc_main.c | 27 -------------------------- 1 file changed, 27 deletions(-) diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index d6890929f..b21e790e0 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -212,27 +212,6 @@ static IWTSVirtualChannel* dvcman_find_channel_by_id(IWTSVirtualChannelManager* return channel; } -static IWTSVirtualChannel* dvcman_find_channel_by_name(IWTSVirtualChannelManager* pChannelMgr, - const char* name) -{ - size_t index; - IWTSVirtualChannel* channel = NULL; - DVCMAN* dvcman = (DVCMAN*)pChannelMgr; - ArrayList_Lock(dvcman->channels); - for (index = 0; index < ArrayList_Count(dvcman->channels); index++) - { - DVCMAN_CHANNEL* cur = (DVCMAN_CHANNEL*)ArrayList_GetItem(dvcman->channels, index); - if (strcmp(cur->channel_name, name) == 0) - { - channel = &cur->iface; - break; - } - } - - ArrayList_Unlock(dvcman->channels); - return channel; -} - static void dvcman_plugin_terminate(void* plugin) { IWTSPlugin* pPlugin = plugin; @@ -340,12 +319,6 @@ static DVCMAN_CHANNEL* dvcman_channel_new(drdynvcPlugin* drdynvc, return NULL; } - if (dvcman_find_channel_by_name(pChannelMgr, ChannelName)) - { - WLog_Print(drdynvc->log, WLOG_ERROR, "Channel %s already open!", ChannelName); - return NULL; - } - channel = (DVCMAN_CHANNEL*)calloc(1, sizeof(DVCMAN_CHANNEL)); if (!channel)