GNOME Bugzilla – Bug 365544
Deprecated DBus calls in gnome-vfs
Last modified: 2006-11-22 21:56:06 UTC
Please describe the problem: Using GIT dbus: gnome-vfs-daemon-method.c: In function 'do_read': gnome-vfs-daemon-method.c:975: warning: 'dbus_message_iter_get_array_len' is deprecated (declared at /opt/gnome2/include/dbus-1.0/dbus/dbus-message.h:176) 'Nuf said. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
The same function occurs in daemon/daemon-connection.c:2257.
*** Bug 371467 has been marked as a duplicate of this bug. ***
Created attachment 76122 [details] [review] Replace usages of dbus_message_iter_get_array_len The one in libgnomevfs/gnome-vfs-daemon-method.c and the one in daemon/daemon-connection.c look easy to fix, but for the one in gnome-vfs-module-callback-marshall.c I don't see how to avoid looping twice through the array except using realloc...
I was cooking up a patch but you seem to know what you are doing :)
Not that much, I did read the API doc to write this as I'm not familiar with DBus but needed gnome-vfs to build to test another patch :-)
hmm very well, me neither. The doc states that you should use dbus_type_is_fixed (type) before using dbus_message_iter_get_fixed_array (). I am not sure if we can savely assume that in all three cases. I thought about the first case in libgnomevfs/gnome-vfs-daemon-method.c like dbus_message_iter_recurse (&iter, &array_iter); if (dbus_type_is_fixed (type)) { dbus_message_iter_get_fixed_array (&array_iter, &data, &size); memcpy (buffer, data, size); }
this currently blocks building, setting BLOCKER
It's fixed in CVS and 2.16.3