mirror of https://github.com/FreeRDP/FreeRDP
wfreerdp: update client
This commit is contained in:
parent
01158f9a34
commit
f6748dba3f
|
@ -38,6 +38,11 @@ add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS})
|
|||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-credui winpr-utils)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/utils/args.h>
|
||||
#include <freerdp/utils/event.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
|
@ -526,33 +525,6 @@ BOOL wf_check_fds(freerdp* instance)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int wf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data)
|
||||
{
|
||||
void* entry = NULL;
|
||||
rdpChannels* channels = (rdpChannels*) user_data;
|
||||
|
||||
entry = freerdp_channels_client_find_static_entry("VirtualChannelEntry", name);
|
||||
|
||||
if (entry)
|
||||
{
|
||||
if (freerdp_channels_client_load(channels, settings, entry, plugin_data) == 0)
|
||||
{
|
||||
printf("loading channel %s (static)\n", name);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf("loading channel %s (plugin)\n", name);
|
||||
freerdp_channels_load_plugin(channels, settings, name, plugin_data);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int wf_process_client_args(rdpSettings* settings, const char* opt, const char* val, void* user_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wfreerdp_run(freerdp* instance)
|
||||
{
|
||||
MSG msg;
|
||||
|
@ -791,7 +763,6 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
//while (1)
|
||||
{
|
||||
int status;
|
||||
int arg_parse_result;
|
||||
|
||||
data = (thread_data*) malloc(sizeof(thread_data));
|
||||
ZeroMemory(data, sizeof(thread_data));
|
||||
|
@ -802,24 +773,18 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
|
||||
if (freerdp_detect_new_command_line_syntax(__argc, __argv))
|
||||
{
|
||||
printf("Using new command-line syntax\n");
|
||||
|
||||
status = freerdp_client_parse_command_line_arguments(instance->context->argc,instance->context->argv, instance->settings);
|
||||
arg_parse_result = status;
|
||||
status = freerdp_client_parse_command_line_arguments(__argc, __argv, instance->settings);
|
||||
|
||||
freerdp_client_load_addins(instance->context->channels, instance->settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
arg_parse_result = freerdp_parse_args(instance->settings, __argc, __argv,
|
||||
wf_process_plugin_args, instance->context->channels, wf_process_client_args, NULL);
|
||||
freerdp_client_print_command_line_help(__argc, __argv);
|
||||
}
|
||||
|
||||
if (arg_parse_result < 0)
|
||||
if (status < 0)
|
||||
{
|
||||
if (arg_parse_result == FREERDP_ARGS_PARSE_FAILURE)
|
||||
printf("failed to parse arguments.\n");
|
||||
|
||||
printf("failed to parse arguments.\n");
|
||||
#ifdef _DEBUG
|
||||
system("pause");
|
||||
#endif
|
||||
|
|
|
@ -112,7 +112,7 @@ int freerdp_client_print_version()
|
|||
return 1;
|
||||
}
|
||||
|
||||
int freerdp_client_print_command_line_help()
|
||||
int freerdp_client_print_command_line_help(int argc, char** argv)
|
||||
{
|
||||
char* str;
|
||||
int length;
|
||||
|
@ -123,7 +123,7 @@ int freerdp_client_print_command_line_help()
|
|||
printf("See www.freerdp.com for more information\n");
|
||||
printf("\n");
|
||||
|
||||
printf("Usage: xfreerdp [file] [options] [/v:<server>[:port]]\n");
|
||||
printf("Usage: %s [file] [options] [/v:<server>[:port]]\n", argv[0]);
|
||||
printf("\n");
|
||||
|
||||
printf("Syntax:\n");
|
||||
|
@ -451,7 +451,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
|||
|
||||
if (status == COMMAND_LINE_STATUS_PRINT_HELP)
|
||||
{
|
||||
freerdp_client_print_command_line_help();
|
||||
freerdp_client_print_command_line_help(argc, argv);
|
||||
return COMMAND_LINE_STATUS_PRINT_HELP;
|
||||
}
|
||||
else if (status == COMMAND_LINE_STATUS_PRINT_VERSION)
|
||||
|
|
|
@ -27,6 +27,7 @@ FREERDP_API BOOL freerdp_detect_new_command_line_syntax(int argc, char* argv[]);
|
|||
|
||||
FREERDP_API int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettings* settings);
|
||||
FREERDP_API int freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings);
|
||||
FREERDP_API int freerdp_client_print_command_line_help(int argc, char** argv);
|
||||
|
||||
#endif /* FREERDP_CLIENT_CMDLINE */
|
||||
|
||||
|
|
|
@ -374,8 +374,14 @@ int transport_write(rdpTransport* transport, STREAM* s)
|
|||
void transport_get_fds(rdpTransport* transport, void** rfds, int* rcount)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
rfds[*rcount] = transport->tcp->wsa_event;
|
||||
rfds[*rcount] = transport->TcpIn->wsa_event;
|
||||
(*rcount)++;
|
||||
|
||||
if (transport->SplitInputOutput)
|
||||
{
|
||||
rfds[*rcount] = transport->TcpOut->wsa_event;
|
||||
(*rcount)++;
|
||||
}
|
||||
#else
|
||||
rfds[*rcount] = (void*)(long)(transport->TcpIn->sockfd);
|
||||
(*rcount)++;
|
||||
|
@ -398,7 +404,7 @@ int transport_check_fds(rdpTransport** ptransport)
|
|||
rdpTransport* transport = *ptransport;
|
||||
|
||||
#ifdef _WIN32
|
||||
WSAResetEvent(transport->tcp->wsa_event);
|
||||
WSAResetEvent(transport->TcpIn->wsa_event);
|
||||
#endif
|
||||
wait_obj_clear(transport->recv_event);
|
||||
|
||||
|
|
|
@ -1114,13 +1114,14 @@ int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
|
|||
{
|
||||
int status;
|
||||
int CopyLength;
|
||||
rpcconn_common_hdr_t* header;
|
||||
rdpRpc* rpc = tsg->rpc;
|
||||
|
||||
DEBUG_TSG("tsg_read: %d, pending: %d", length, tsg->PendingPdu);
|
||||
|
||||
if (tsg->PendingPdu)
|
||||
{
|
||||
rpcconn_common_hdr_t* header;
|
||||
|
||||
header = (rpcconn_common_hdr_t*) rpc->buffer;
|
||||
|
||||
CopyLength = (tsg->BytesAvailable > length) ? length : tsg->BytesAvailable;
|
||||
|
@ -1136,8 +1137,11 @@ int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length)
|
|||
}
|
||||
else
|
||||
{
|
||||
rpcconn_response_hdr_t* header;
|
||||
|
||||
status = rpc_recv_pdu(rpc);
|
||||
rpcconn_response_hdr_t* header = (rpcconn_response_hdr_t*) rpc->buffer;
|
||||
|
||||
header = (rpcconn_response_hdr_t*) rpc->buffer;
|
||||
|
||||
if (!rpc_get_stub_data_info(rpc, rpc->buffer, &tsg->StubOffset, &tsg->StubLength))
|
||||
{
|
||||
|
|
|
@ -562,7 +562,9 @@ BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname)
|
|||
free(certificate_data);
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
free(common_name);
|
||||
#endif
|
||||
|
||||
return verification_status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue