mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
client: Check if channel has already been added
This commit is contained in:
parent
eeae688ed3
commit
a391a3decc
@ -628,6 +628,13 @@ BOOL freerdp_client_add_static_channel(rdpSettings* settings, int count,
|
|||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
ADDIN_ARGV* args;
|
ADDIN_ARGV* args;
|
||||||
|
|
||||||
|
if (!settings || !params || !params[0])
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (freerdp_static_channel_collection_find(settings, params[0]))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
args = (ADDIN_ARGV*) calloc(1, sizeof(ADDIN_ARGV));
|
args = (ADDIN_ARGV*) calloc(1, sizeof(ADDIN_ARGV));
|
||||||
|
|
||||||
if (!args)
|
if (!args)
|
||||||
@ -673,6 +680,13 @@ BOOL freerdp_client_add_dynamic_channel(rdpSettings* settings, int count,
|
|||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
ADDIN_ARGV* args;
|
ADDIN_ARGV* args;
|
||||||
|
|
||||||
|
if (!settings || !params || !params[0])
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (freerdp_dynamic_channel_collection_find(settings, params[0]))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
args = (ADDIN_ARGV*) malloc(sizeof(ADDIN_ARGV));
|
args = (ADDIN_ARGV*) malloc(sizeof(ADDIN_ARGV));
|
||||||
|
|
||||||
if (!args)
|
if (!args)
|
||||||
@ -2737,8 +2751,6 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settings->RedirectClipboard)
|
if (settings->RedirectClipboard)
|
||||||
{
|
|
||||||
if (!freerdp_static_channel_collection_find(settings, "cliprdr"))
|
|
||||||
{
|
{
|
||||||
char* params[1];
|
char* params[1];
|
||||||
params[0] = "cliprdr";
|
params[0] = "cliprdr";
|
||||||
@ -2746,7 +2758,6 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
|
|||||||
if (!freerdp_client_add_static_channel(settings, 1, (char**) params))
|
if (!freerdp_client_add_static_channel(settings, 1, (char**) params))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (settings->LyncRdpMode)
|
if (settings->LyncRdpMode)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user