diff options
author | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-03-10 17:37:35 +0300 |
---|---|---|
committer | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-03-10 17:37:35 +0300 |
commit | d141575abd606663443f2d809d88b62a04a95281 (patch) | |
tree | 4d603caa825592491b6506e7c399f748186d798c /plugins | |
parent | 178d31b0a492530bb8b92d2c8cd88474719fbb84 (diff) |
Get the right value for FreeRDP_AutoReconnectMaxRetries
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/rdp/rdp_plugin.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c index a08f68b33..9fe639424 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; |