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:
authorAntenore Gatta (tmow) <antenore@simbiosi.org>2022-03-10 17:38:46 +0300
committerAntenore Gatta (tmow) <antenore@simbiosi.org>2022-03-10 17:38:46 +0300
commit59efd80d0ad8e023c1f501f54ed8c723fce26550 (patch)
tree6569482c0168fe3d42c12a96d84227d1fac6bf0f /plugins/rdp
parent11a4ca1e7b122a622199b445788b4e238cede09a (diff)
parentd141575abd606663443f2d809d88b62a04a95281 (diff)
Merge branch 'issue/2695-max-reconnect' into 'master'
Get the right value for FreeRDP_AutoReconnectMaxRetries See merge request Remmina/Remmina!2388
Diffstat (limited to 'plugins/rdp')
-rw-r--r--plugins/rdp/rdp_plugin.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c
index 7f6b2cbb5..725558cab 100644
--- a/plugins/rdp/rdp_plugin.c
+++ b/plugins/rdp/rdp_plugin.c
@@ -401,16 +401,20 @@ BOOL rf_auto_reconnect(rfContext *rfi)
rfi->stop_reconnecting_requested = FALSE;
/* Get the value set in FreeRDP_AutoReconnectMaxRetries (20) */
- maxattempts = FreeRDP_AutoReconnectMaxRetries;
+ maxattempts = freerdp_settings_get_uint32(settings, FreeRDP_AutoReconnectMaxRetries);
+ REMMINA_PLUGIN_DEBUG("maxattempts from default: %d", maxattempts);
/* Get the value from the global preferences if any */
if ((cval = remmina_plugin_service->pref_get_value("rdp_reconnect_attempts")) != NULL)
maxattempts = atoi(cval);
+ REMMINA_PLUGIN_DEBUG("maxattempts from general preferences: %d", maxattempts);
/* Get the value from the profile if any, otherwise uses the value of maxattempts */
maxattempts = remmina_plugin_service->file_get_int(remminafile, "rdp_reconnect_attempts", maxattempts);
+ REMMINA_PLUGIN_DEBUG("maxattempts from general plugin: %d", maxattempts);
/* If maxattemps is <= 0, we get the value from FreeRDP_AutoReconnectMaxRetries (20) */
- if (maxattempts < 0)
+ if (maxattempts <= 0)
maxattempts = freerdp_settings_get_uint32(settings, FreeRDP_AutoReconnectMaxRetries);
freerdp_settings_set_uint32(settings, FreeRDP_AutoReconnectMaxRetries, maxattempts);
+ REMMINA_PLUGIN_DEBUG("maxattempts set to: %d", maxattempts);
rfi->reconnect_maxattempts = maxattempts;
rfi->reconnect_nattempt = 0;