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

github.com/FreeRDP/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:25:22 +0300
committerAntenore Gatta (tmow) <antenore@simbiosi.org>2022-03-10 17:25:22 +0300
commit673102073819a3c0871b0ca215592b1a673145e1 (patch)
tree1570a420248a41661f4bb0c567f7f635d654850a /plugins
parent31fe085db32972f0e596f4f42aeb76cd2194a5e1 (diff)
parent178d31b0a492530bb8b92d2c8cd88474719fbb84 (diff)
Merge branch 'issue/2695-max-reconnect' into 'master'
Minor fixes Closes #2687 and #2695 See merge request Remmina/Remmina!2387
Diffstat (limited to 'plugins')
-rw-r--r--plugins/rdp/rdp_plugin.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c
index 3df43f1a2..7f6b2cbb5 100644
--- a/plugins/rdp/rdp_plugin.c
+++ b/plugins/rdp/rdp_plugin.c
@@ -400,12 +400,18 @@ BOOL rf_auto_reconnect(rfContext *rfi)
rfi->is_reconnecting = TRUE;
rfi->stop_reconnecting_requested = FALSE;
+ /* Get the value set in FreeRDP_AutoReconnectMaxRetries (20) */
maxattempts = FreeRDP_AutoReconnectMaxRetries;
+ /* Get the value from the global preferences if any */
if ((cval = remmina_plugin_service->pref_get_value("rdp_reconnect_attempts")) != NULL)
maxattempts = atoi(cval);
+ /* 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);
- if (maxattempts <= 0)
+ /* If maxattemps is <= 0, we get the value from FreeRDP_AutoReconnectMaxRetries (20) */
+ if (maxattempts < 0)
maxattempts = freerdp_settings_get_uint32(settings, FreeRDP_AutoReconnectMaxRetries);
+ freerdp_settings_set_uint32(settings, FreeRDP_AutoReconnectMaxRetries, maxattempts);
+
rfi->reconnect_maxattempts = maxattempts;
rfi->reconnect_nattempt = 0;
@@ -440,7 +446,6 @@ BOOL rf_auto_reconnect(rfContext *rfi)
* - processing of the UI event we just pushed on the queue
* - better network conditions
* Remember: We hare on a thread, so the main gui won’t lock */
-
usleep(500000);
/* Perform an auto-reconnect. */
@@ -2010,7 +2015,9 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget *gp)
remmina_plugin_service->protocol_plugin_set_height(gp, freerdp_settings_get_uint32(rfi->settings, FreeRDP_DesktopHeight));
}
- if (remmina_plugin_service->file_get_int(remminafile, "sharesmartcard", FALSE)) {
+ const gchar *sn = remmina_plugin_service->file_get_string(remminafile, "smartcardname");
+ if (remmina_plugin_service->file_get_int(remminafile, "sharesmartcard", FALSE) ||
+ (sn != NULL && sn[0] != '\0')) {
RDPDR_SMARTCARD *smartcard;
smartcard = (RDPDR_SMARTCARD *)calloc(1, sizeof(RDPDR_SMARTCARD));
@@ -2026,7 +2033,6 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget *gp)
freerdp_settings_set_bool(rfi->settings, FreeRDP_DeviceRedirection, TRUE);
- const gchar *sn = remmina_plugin_service->file_get_string(remminafile, "smartcardname");
if (sn != NULL && sn[0] != '\0')
sdev->Name = _strdup(sn);