diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-01-10 11:18:00 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-01-10 11:18:00 +0000 |
commit | fd7a19aeea4f0c9482a06d83eedf88a5f706861f (patch) | |
tree | d929da7fa3aacfc60c96f284731dcbd1718f2414 /common/gmounttracker.c | |
parent | 6aff5a94a0927b26101dccf4af4cf0495bef6be3 (diff) | |
download | gvfs-fd7a19aeea4f0c9482a06d83eedf88a5f706861f.tar.gz |
Handle error reply from list_mounts.
2008-01-10 Alexander Larsson <alexl@redhat.com>
* common/gmounttracker.c:
Handle error reply from list_mounts.
* programs/gvfs-mount.c:
Add option to list mounts.
Based on patch from nf2@scheinwelt.at
svn path=/trunk/; revision=1089
Diffstat (limited to 'common/gmounttracker.c')
-rw-r--r-- | common/gmounttracker.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/common/gmounttracker.c b/common/gmounttracker.c index 4b3b7717..aad00aba 100644 --- a/common/gmounttracker.c +++ b/common/gmounttracker.c @@ -386,18 +386,25 @@ list_mounts_reply (DBusPendingCall *pending, dbus_pending_call_unref (pending); b = dbus_message_iter_init (reply, &iter); - dbus_message_iter_recurse (&iter, &array_iter); - - do + if (b && dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY) { - info = g_mount_info_from_dbus (&array_iter); - if (info) - { - g_mount_tracker_add_mount (tracker, info); - g_mount_info_unref (info); - } + dbus_message_iter_recurse (&iter, &array_iter); + + do + { + info = g_mount_info_from_dbus (&array_iter); + if (info) + { + g_mount_tracker_add_mount (tracker, info); + g_mount_info_unref (info); + } + } + while (dbus_message_iter_next (&array_iter)); + } + else + { + /* list_mounts_reply problem - gvfsd not running? */ } - while (dbus_message_iter_next (&array_iter)); dbus_message_unref (reply); } |