Revert "drdynvc: Prevent opening an already opened dynamic channel"

This reverts commit feda57a739.
This commit is contained in:
Martin Fleisz 2022-02-23 16:14:55 +01:00 committed by akallabeth
parent fd027d1bf0
commit 8d49175a94

View File

@ -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)