From 2561c171e74747f47593192c5e9fd663fc3d0d8f Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Tue, 12 Aug 2014 11:03:27 -0500 Subject: 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. --- src/remote-viewer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/remote-viewer.c') 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; } -- cgit