After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 365544 - Deprecated DBus calls in gnome-vfs
Deprecated DBus calls in gnome-vfs
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Build
cvs (head)
Other All
: Normal blocker
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 371467 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-27 02:24 UTC by Ben Gamari
Modified: 2006-11-22 21:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Replace usages of dbus_message_iter_get_array_len (2.61 KB, patch)
2006-11-06 23:23 UTC, Pascal Terjan
none Details | Review

Description Ben Gamari 2006-10-27 02:24:18 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:
Comment 1 Ben Gamari 2006-10-27 05:38:26 UTC
The same function occurs in daemon/daemon-connection.c:2257.
Comment 2 Pascal Terjan 2006-11-06 17:38:27 UTC
*** Bug 371467 has been marked as a duplicate of this bug. ***
Comment 3 Pascal Terjan 2006-11-06 23:23:19 UTC
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...
Comment 4 Christian Kirbach 2006-11-07 15:02:14 UTC
I was cooking up a patch but you seem to know what you are doing :)
Comment 5 Pascal Terjan 2006-11-07 15:05:42 UTC
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 :-)
Comment 6 Christian Kirbach 2006-11-07 15:57:25 UTC
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);
	} 

Comment 7 Christian Kirbach 2006-11-11 12:53:39 UTC
this currently blocks building, setting BLOCKER
Comment 8 Pascal Terjan 2006-11-22 21:55:52 UTC
It's fixed in CVS and 2.16.3