mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 11:54:44 +08:00
libfreerdp-core: fix ignored port settings for TS Gateway and vmconnect
This commit is contained in:
parent
1ce1bcb5a3
commit
e8a9b7ff14
@ -1149,10 +1149,6 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
settings->PreconnectionBlob = _strdup(arg->Value);
|
||||
}
|
||||
}
|
||||
CommandLineSwitchCase(arg, "port")
|
||||
{
|
||||
settings->ServerPort = atoi(arg->Value);
|
||||
}
|
||||
CommandLineSwitchCase(arg, "w")
|
||||
{
|
||||
settings->DesktopWidth = atoi(arg->Value);
|
||||
@ -1755,6 +1751,13 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
}
|
||||
}
|
||||
|
||||
arg = CommandLineFindArgumentA(args, "port");
|
||||
|
||||
if (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT)
|
||||
{
|
||||
settings->ServerPort = atoi(arg->Value);
|
||||
}
|
||||
|
||||
arg = CommandLineFindArgumentA(args, "p");
|
||||
|
||||
if (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT)
|
||||
|
@ -234,6 +234,7 @@ rdpSettings* freerdp_settings_new(DWORD flags)
|
||||
settings->DisableEncryption = FALSE;
|
||||
settings->SaltedChecksum = TRUE;
|
||||
settings->ServerPort = 3389;
|
||||
settings->GatewayPort = 443;
|
||||
settings->DesktopResize = TRUE;
|
||||
settings->ToggleFullscreen = TRUE;
|
||||
settings->DesktopPosX = 0;
|
||||
|
@ -29,10 +29,10 @@
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/print.h>
|
||||
#include <winpr/stream.h>
|
||||
|
||||
#include <freerdp/error.h>
|
||||
#include <freerdp/utils/tcp.h>
|
||||
#include <winpr/stream.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
@ -365,10 +365,10 @@ BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 por
|
||||
transport->layer = TRANSPORT_LAYER_TSG;
|
||||
transport->TcpOut = tcp_new(settings);
|
||||
|
||||
status = tcp_connect(transport->TcpIn, settings->GatewayHostname, 443);
|
||||
status = tcp_connect(transport->TcpIn, settings->GatewayHostname, settings->GatewayPort);
|
||||
|
||||
if (status)
|
||||
status = tcp_connect(transport->TcpOut, settings->GatewayHostname, 443);
|
||||
status = tcp_connect(transport->TcpOut, settings->GatewayHostname, settings->GatewayPort);
|
||||
|
||||
if (status)
|
||||
status = transport_tsg_connect(transport, hostname, port);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <winpr/winpr.h>
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/file.h>
|
||||
#include <winpr/heap.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user