diff options
-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 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; |