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 672239 - request NO_REPLY from g_dbus_connection_call() with no async callback
request NO_REPLY from g_dbus_connection_call() with no async callback
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other All
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on: 672249
Blocks:
 
 
Reported: 2012-03-16 16:00 UTC by Allison Karlitskaya (desrt)
Modified: 2012-03-19 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDBus: set no-reply flag on calls with no callback (9.21 KB, patch)
2012-03-16 17:33 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2012-03-16 16:00:14 UTC
In the case that the user has no callback for g_dbus_connection_call() then we should do a bit of cleverness and instruct the remote side not to reply to us.

We should do the same for _call() methods on proxies as well, but not for any calls that deal with GDBusMessage directly.  For those methods, the user has direct access to the GDBusMessage and can set the flag for themselves and also the user can see the serial number (so they might be processing the reply in a filter).

We discussed the possibility of instead adding a new GDBusCallFlags to make the setting of the flag more explicit, but after thinking about it, this raises some ugly edge cases: what if the user sets the flag, but gives a callback anyway?

After a discussion of the risks, David and I agree that the best way to proceed is to automatically set the no-reply flag if the callback is NULL.  If this new behaviour causes problems for anybody (and it's hard to imagine how it could) then they can always work around it by giving a do-nothing callback.
Comment 1 Allison Karlitskaya (desrt) 2012-03-16 17:33:53 UTC
Created attachment 209945 [details] [review]
GDBus: set no-reply flag on calls with no callback

If g_dbus_connection_call() or g_dbus_proxy_call() are given a NULL
callback then set the no-reply flag on the outgoing D-Bus message.
Comment 2 Allison Karlitskaya (desrt) 2012-03-16 17:34:28 UTC
The patch needs to be applied on top of the one from bug 672249.
Comment 3 David Zeuthen (not reading bugmail) 2012-03-19 16:39:31 UTC
Comment on attachment 209945 [details] [review]
GDBus: set no-reply flag on calls with no callback

Looks good to me, thanks!
Comment 4 Allison Karlitskaya (desrt) 2012-03-19 16:41:49 UTC
Attachment 209945 [details] pushed as 2afbc42 - GDBus: set no-reply flag on calls with no callback