summaryrefslogtreecommitdiffstats
path: root/src/remote-viewer.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2014-08-12 11:03:27 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2014-08-26 16:54:01 -0500
commit2561c171e74747f47593192c5e9fd663fc3d0d8f (patch)
tree5ed01e49cc2d139e2c40a1dde3c21a221138f32e /src/remote-viewer.c
parentb7c80494606c0dbfbae305411ad0080a5ef9282c (diff)
downloadvirt-viewer-2561c171e74747f47593192c5e9fd663fc3d0d8f.tar.gz
virt-viewer-2561c171e74747f47593192c5e9fd663fc3d0d8f.tar.xz
virt-viewer-2561c171e74747f47593192c5e9fd663fc3d0d8f.zip
Change collect_credentials() to return a boolean
Instead of returning 0 for success and -1 for failure, change to a boolean success value to be more consistent with the rest of the virt-viewer code.
Diffstat (limited to 'src/remote-viewer.c')
-rw-r--r--src/remote-viewer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index 89ad227..5f5fa3d 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -734,17 +734,18 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
gchar *username = NULL;
gchar *password = NULL;
VirtViewerWindow *window;
+ gboolean success = FALSE;
g_object_get(proxy,
"username", &username,
NULL);
window = virt_viewer_app_get_main_window(VIRT_VIEWER_APP(user_data));
- int ret = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
+ success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
"oVirt",
NULL,
&username, &password);
- if (ret == 0) {
+ if (success) {
g_object_set(G_OBJECT(proxy),
"username", username,
"password", password,
@@ -753,7 +754,7 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
g_free(username);
g_free(password);
- return (ret == 0);
+ return success;
}