GUACAMOLE-221: Tweak logic for when RDP domain is requested.

This commit is contained in:
Nick Couchman 2020-09-18 22:04:51 -04:00
parent bfb54f72a0
commit 3b4007c9fa

View File

@ -256,6 +256,14 @@ static BOOL rdp_freerdp_authenticate(freerdp* instance, char** username,
guac_argv_register(GUAC_RDP_ARGV_USERNAME, guac_rdp_argv_callback, NULL, 0); guac_argv_register(GUAC_RDP_ARGV_USERNAME, guac_rdp_argv_callback, NULL, 0);
params[i] = GUAC_RDP_ARGV_USERNAME; params[i] = GUAC_RDP_ARGV_USERNAME;
i++; i++;
/* If username is undefined and domain is also undefined, request domain. */
if (settings->domain == NULL) {
guac_argv_register(GUAC_RDP_ARGV_DOMAIN, guac_rdp_argv_callback, NULL, 0);
params[i] = GUAC_RDP_ARGV_DOMAIN;
i++;
}
} }
/* If the password is undefined, add it to the requested parameters. */ /* If the password is undefined, add it to the requested parameters. */
@ -265,13 +273,6 @@ static BOOL rdp_freerdp_authenticate(freerdp* instance, char** username,
i++; i++;
} }
/* If the domain is undefined, add it to the requested parameters. */
if (settings->domain == NULL) {
guac_argv_register(GUAC_RDP_ARGV_DOMAIN, guac_rdp_argv_callback, NULL, 0);
params[i] = GUAC_RDP_ARGV_DOMAIN;
i++;
}
/* NULL-terminate the array. */ /* NULL-terminate the array. */
params[i] = NULL; params[i] = NULL;