From fec1fb501d0df5e681887aa919ba171411bc7234 Mon Sep 17 00:00:00 2001 From: myheroyuki Date: Tue, 11 Jul 2023 21:12:47 +0900 Subject: Remote assistance now works in Remmina in the same way the /assistance flag works in FreeRDP --- plugins/python_wrapper/python_wrapper_remmina.c | 1 + plugins/rdp/rdp_plugin.c | 31 ++++--------------------- 2 files changed, 6 insertions(+), 26 deletions(-) (limited to 'plugins') diff --git a/plugins/python_wrapper/python_wrapper_remmina.c b/plugins/python_wrapper/python_wrapper_remmina.c index 2dbb9d17e..c61ab09b5 100644 --- a/plugins/python_wrapper/python_wrapper_remmina.c +++ b/plugins/python_wrapper/python_wrapper_remmina.c @@ -661,6 +661,7 @@ PyMODINIT_FUNC python_wrapper_module_initialize(void) PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_SERVER", (long)REMMINA_PROTOCOL_SETTING_TYPE_SERVER); PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_PASSWORD", (long)REMMINA_PROTOCOL_SETTING_TYPE_PASSWORD); PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_RESOLUTION", (long)REMMINA_PROTOCOL_SETTING_TYPE_RESOLUTION); + PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_ASSISTANCE", (long)REMMINA_PROTOCOL_SETTING_TYPE_ASSISTANCE); PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_KEYMAP", (long)REMMINA_PROTOCOL_SETTING_TYPE_KEYMAP); PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_TEXT", (long)REMMINA_PROTOCOL_SETTING_TYPE_TEXT); PyModule_AddIntConstant(module, "PROTOCOL_SETTING_TYPE_SELECT", (long)REMMINA_PROTOCOL_SETTING_TYPE_SELECT); diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c index 655660e5d..5f938c90e 100644 --- a/plugins/rdp/rdp_plugin.c +++ b/plugins/rdp/rdp_plugin.c @@ -1376,44 +1376,23 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget *gp) freerdp_settings_set_string(rfi->settings, FreeRDP_ConfigPath, datapath); g_free(datapath); - - - - - - if (remmina_plugin_service->file_get_int(remminafile, "assistance_mode", FALSE)){ + if (remmina_plugin_service->file_get_int(remminafile, "assistance_mode", 0)){ rdpAssistanceFile* file = freerdp_assistance_file_new(); if (!file) REMMINA_PLUGIN_DEBUG("Failed to get file"); - status = freerdp_assistance_parse_file(file, "", ""); + status = freerdp_assistance_parse_file(file, + remmina_plugin_service->file_get_string(remminafile, "assistance_file"), + remmina_plugin_service->file_get_string(remminafile, "assistance_pass")); if (status < 0) REMMINA_PLUGIN_DEBUG("Failed to get status");; if (!freerdp_assistance_populate_settings_from_assistance_file(file, rfi->settings)) REMMINA_PLUGIN_DEBUG("Failed to populate"); - - } - - - - - - - - - - - - - - - - #if defined(PROXY_TYPE_IGNORE) if (!remmina_plugin_service->file_get_int(remminafile, "useproxyenv", FALSE) ? TRUE : FALSE) { REMMINA_PLUGIN_DEBUG("Not using system proxy settings"); @@ -2910,6 +2889,7 @@ static const RemminaProtocolSetting remmina_rdp_advanced_settings[] = { REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "vc", N_("Static virtual channel"), FALSE, NULL, N_("[,]") }, { REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "rdp2tcp", N_("TCP redirection"), FALSE, NULL, N_("/PATH/TO/rdp2tcp") }, { REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "rdp_reconnect_attempts", N_("Reconnect attempts number"), FALSE, NULL, N_("The maximum number of reconnect attempts upon an RDP disconnect (default: 20)") }, + { REMMINA_PROTOCOL_SETTING_TYPE_ASSISTANCE, "assistance_mode", N_("Attempt to connect in assistnace mode"), TRUE, NULL }, { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "preferipv6", N_("Prefer IPv6 AAAA record over IPv4 A record"), TRUE, NULL, NULL }, { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "shareprinter", N_("Share printers"), TRUE, NULL, NULL }, { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "shareserial", N_("Share serial ports"), TRUE, NULL, NULL }, @@ -2935,7 +2915,6 @@ static const RemminaProtocolSetting remmina_rdp_advanced_settings[] = { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "websockets", N_("Enable Gateway websockets support"), TRUE, NULL, NULL }, #endif { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "no-suppress", N_("Update framebuffer even when not visible"), TRUE, NULL }, - { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "assistance_mode", N_("Attempt to connect in assistnace mode"), TRUE, NULL }, { REMMINA_PROTOCOL_SETTING_TYPE_END, NULL, NULL, FALSE, NULL, NULL } }; -- cgit v1.2.3