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);
params[i] = GUAC_RDP_ARGV_USERNAME;
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. */
@ -265,13 +273,6 @@ static BOOL rdp_freerdp_authenticate(freerdp* instance, char** username,
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. */
params[i] = NULL;