rhbz#1007306 - Don't free session if we're re-trying auth

deactivate() is called in response to a failed authentication attempt. If the
session is cleared here, when a user attempts to re-authenticate, it will issue
a warning and will not actually work. So only clear the session here if we're
not going to re-try authentication.
This commit is contained in:
Jonathon Jongsma 2014-01-31 13:56:19 -06:00
parent 51c3a0decf
commit 74b532f1ec

View File

@ -1267,7 +1267,6 @@ virt_viewer_app_deactivate(VirtViewerApp *self, gboolean connect_error)
if (priv->session) {
virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
g_clear_object(&priv->session);
}
priv->connected = FALSE;
@ -1283,8 +1282,10 @@ virt_viewer_app_deactivate(VirtViewerApp *self, gboolean connect_error)
if (priv->authretry) {
priv->authretry = FALSE;
g_idle_add(virt_viewer_app_retryauth, self);
} else
} else {
g_clear_object(&priv->session);
virt_viewer_app_deactivated(self, connect_error);
}
}