Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyheroyuki <myheroyuki@outlook.com>2023-07-11 15:46:58 +0300
committermyheroyuki <myheroyuki@outlook.com>2023-07-11 15:46:58 +0300
commite46df1d9904c158798bf873c51d25590d066d666 (patch)
treef72204143ee4737fdaf936cd09db1296347eaa0b /plugins
parentfec1fb501d0df5e681887aa919ba171411bc7234 (diff)
Better handle errors when attempting to connect in Assistance mode
Diffstat (limited to 'plugins')
-rw-r--r--plugins/rdp/rdp_plugin.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c
index 5f938c90e..807b63fa1 100644
--- a/plugins/rdp/rdp_plugin.c
+++ b/plugins/rdp/rdp_plugin.c
@@ -1378,18 +1378,31 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget *gp)
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");
+ if (!file){
+ REMMINA_PLUGIN_DEBUG("Failed to allocate Assistance File structure");
+ return FALSE;
+ }
+
+ if (remmina_plugin_service->file_get_string(remminafile, "assistance_file") == NULL ||
+ remmina_plugin_service->file_get_string(remminafile, "assistance_pass") == NULL ){
+
+ REMMINA_PLUGIN_DEBUG("Assistance File and Password are not set while Assistance Mode is enabled");
+ return FALSE;
+ }
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 (status < 0){
+ REMMINA_PLUGIN_DEBUG("Failed to Parse Assistance File");
+ return FALSE;
+ }
+
if (!freerdp_assistance_populate_settings_from_assistance_file(file, rfi->settings))
- REMMINA_PLUGIN_DEBUG("Failed to populate");
+ REMMINA_PLUGIN_DEBUG("Failed to populate settings from Assistance File");
+ return FALSE;
}