diff options
author | Ondrej Holy <oholy@redhat.com> | 2015-09-30 15:03:05 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2015-10-02 12:45:03 +0200 |
commit | eef594d24918d28ad5f0f736825a333df955c6c4 (patch) | |
tree | 2916f80c11f147dfbc5244e86235b6029c8ff8a7 /client | |
parent | b75a1896e740b3486a01961803fc304e0d3b3efe (diff) | |
download | gvfs-eef594d24918d28ad5f0f736825a333df955c6c4.tar.gz |
client: Use g_warning if proxy creation failed
Currently g_errprint is used and thus a message doesn't end up in a logs.
Use g_warning to log the message and also replace g_return_if_fail,
because proxy creation failure isn't programmer error.
https://bugzilla.gnome.org/show_bug.cgi?id=755805
Diffstat (limited to 'client')
-rw-r--r-- | client/gdaemonvfs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c index 11435e85..caf846a5 100644 --- a/client/gdaemonvfs.c +++ b/client/gdaemonvfs.c @@ -575,7 +575,7 @@ create_mount_tracker_proxy () &error); if (proxy == NULL) { - g_printerr ("Error creating proxy: %s (%s, %d)\n", + g_warning ("Error creating proxy: %s (%s, %d)\n", error->message, g_quark_to_string (error->domain), error->code); g_error_free (error); } @@ -599,7 +599,8 @@ fill_mountable_info (GDaemonVfs *vfs) gboolean host_is_inet; proxy = create_mount_tracker_proxy (); - g_return_if_fail (proxy != NULL); + if (proxy == NULL) + return; error = NULL; if (!gvfs_dbus_mount_tracker_call_list_mountable_info_sync (proxy, @@ -949,7 +950,8 @@ _g_daemon_vfs_get_mount_info_sync (GMountSpec *spec, return info; proxy = create_mount_tracker_proxy (); - g_return_val_if_fail (proxy != NULL, NULL); + if (proxy == NULL) + return NULL; if (gvfs_dbus_mount_tracker_call_lookup_mount_sync (proxy, g_mount_spec_to_dbus_with_path (spec, path), @@ -982,7 +984,8 @@ _g_daemon_vfs_get_mount_info_by_fuse_sync (const char *fuse_path, return info; proxy = create_mount_tracker_proxy (); - g_return_val_if_fail (proxy != NULL, NULL); + if (proxy == NULL) + return NULL; if (gvfs_dbus_mount_tracker_call_lookup_mount_by_fuse_path_sync (proxy, fuse_path, |