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 623143 - Never require non-closed connections
Never require non-closed connections
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-06-29 14:50 UTC by David Zeuthen (not reading bugmail)
Modified: 2010-06-29 19:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Zeuthen (not reading bugmail) 2010-06-29 14:50:11 UTC
There's a couple of places in GDBus where it's a programming error (e.g. we'll assert or spew via e.g. g_warning()) to use the API on a closed connection. This approach can never work since a GDBusConnection can be closed at any point in time outside of programmer control.

Just change the code to return a run-time error (e.g. return G_IO_ERROR_CLOSED when sending messages, invoking methods) or silently accept the request (e.g. exporting objects, registering for signals) without doing anything.

Note that a GDBusConnection object is always useless after being closed - e.g. there's no way to "reopen" a connection - the user will have to create a new object and use that instead.
Comment 1 David Zeuthen (not reading bugmail) 2010-06-29 19:22:54 UTC
Fixed here

http://git.gnome.org/browse/glib/commit/?id=6d4ade4cf0d6ed64ce59f3db4f270be08a4478fd