mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-31 20:04:01 +00:00
Let the user cancel the SPICE auth dialog
virt_viewer_auth_collect_credentials() was recently changed to return
a boolean instead of an integer (2561c171). This change introduced a
regression in the authentication dialog behavior, making it impossible
for the user to cancel.
This commit is contained in:
parent
141d69b7f5
commit
ec5a661469
@ -482,7 +482,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
|
||||
{
|
||||
VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(session);
|
||||
gchar *password = NULL, *user = NULL;
|
||||
int ret;
|
||||
gboolean ret;
|
||||
|
||||
g_return_if_fail(self != NULL);
|
||||
|
||||
@ -513,7 +513,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
|
||||
"SPICE",
|
||||
NULL,
|
||||
NULL, &password);
|
||||
if (ret < 0) {
|
||||
if (!ret) {
|
||||
g_signal_emit_by_name(session, "session-cancelled");
|
||||
} else {
|
||||
gboolean openfd;
|
||||
@ -542,7 +542,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
|
||||
ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
|
||||
"proxy", NULL,
|
||||
&user, &password);
|
||||
if (ret < 0) {
|
||||
if (!ret) {
|
||||
g_signal_emit_by_name(session, "session-cancelled");
|
||||
} else {
|
||||
spice_uri_set_user(proxy, user);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user