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 656173 - GDBusProxy calls GetAll on bus daemon if service isn't running
GDBusProxy calls GetAll on bus daemon if service isn't running
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.29.x
Other All
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks: 656039
 
 
Reported: 2011-08-08 18:42 UTC by Simon McVittie
Modified: 2011-08-15 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
log from gdbus-proxy-well-known-name showing this bug (120.54 KB, text/x-log)
2011-08-08 18:43 UTC, Simon McVittie
  Details
log with this fixed (113.55 KB, text/plain)
2011-08-08 18:43 UTC, Simon McVittie
  Details
patch (2.27 KB, patch)
2011-08-08 18:44 UTC, Simon McVittie
none Details | Review
patch v2 (2.28 KB, patch)
2011-08-15 15:45 UTC, Simon McVittie
committed Details | Review

Description Simon McVittie 2011-08-08 18:42:21 UTC
Another bug spotted while trying to write a test-case for Bug #651133. If you run:

    ( cd gio/tests && G_DBUS_DEBUG=all ./gdbus-proxy-well-known-name )

you can see that in the case where the name com.example.TestService isn't owned yet, the GDBusProxy calls GetAll() with no destination, resulting in an error reply from the peer (the dbus-daemon itself). That's clearly not right!

However, if priv->name is NULL, that indicates the special case where we really do want to talk directly to a peer, instead of via the bus daemon (most likely to be used on peer-to-peer connections, but we could even be talking to the bus daemon itself). In that special case, calling GetAll() with no destination is right.
Comment 1 Simon McVittie 2011-08-08 18:43:31 UTC
Created attachment 193432 [details]
log from gdbus-proxy-well-known-name showing this bug

The offending call starts at about line 495.
Comment 2 Simon McVittie 2011-08-08 18:43:54 UTC
Created attachment 193433 [details]
log with this fixed
Comment 3 Simon McVittie 2011-08-08 18:44:21 UTC
Created attachment 193434 [details] [review]
patch
Comment 4 Cosimo Alfarano 2011-08-11 10:46:09 UTC
Without any reviewer hat: it seems OK
Comment 5 Simon McVittie 2011-08-15 15:45:48 UTC
Created attachment 193876 [details] [review]
patch v2

(Functionally the same, but Matthias said on Bug #656039 that he wants multi-line comments to end with "*/" on a new line.)
Comment 6 David Zeuthen (not reading bugmail) 2011-08-15 16:54:02 UTC
Comment on attachment 193876 [details] [review]
patch v2

Committed thanks!