Skip to content

Commit

Permalink
Merge branch 'no-reply' into 'master'
Browse files Browse the repository at this point in the history
Silence "Rejected send message" D-Bus errors

This doesn't cover all the cases. For example, it doesn't cover `org.freedesktop.DBus.Introspectable.Introspect` calls that don't expect a reply; this is possible even though it doesn't make any practical sense. But it does cover the most common use case, i.e. a normal D-Bus call that has no reply.

See merge request !1
  • Loading branch information
stskeeps committed Dec 4, 2015
2 parents e17d031 + aec9288 commit 9f89b56
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rpm/gdbus-no-reply-expected.patch
@@ -0,0 +1,14 @@
diff --git a/gio/gdbusmethodinvocation.c b/gio/gdbusmethodinvocation.c
index c6cab91..26c04ee 100644
--- a/gio/gdbusmethodinvocation.c
+++ b/gio/gdbusmethodinvocation.c
@@ -479,6 +479,9 @@ g_dbus_method_invocation_return_value_internal (GDBusMethodInvocation *invocatio
g_assert_not_reached ();
}

+ if (g_dbus_message_get_flags (invocation->message) & G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED)
+ goto out;
+
if (G_UNLIKELY (_g_dbus_debug_return ()))
{
_g_dbus_debug_print_lock ();
3 changes: 3 additions & 0 deletions rpm/glib2.spec
Expand Up @@ -17,6 +17,7 @@ Patch1: glib-2.36.3-syslog-message-handler.patch
Patch2: 0001-Add-dev-mmcblk-to-the-list-of-devices-to-be-detected.patch
Patch3: use-mtab-instead-of-fstab.patch
Patch4: 0001-networkaddress-fix-parsing-of-uri-with-after-authori.patch
Patch5: gdbus-no-reply-expected.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libpcre)
Expand Down Expand Up @@ -72,6 +73,8 @@ version 2 of the GLib library.
%patch3 -p1
# 0001-networkaddress-fix-parsing-of-uri-with-after-authori.patch
%patch4 -p1
# gdbus-no-reply-expected.patch
%patch5 -p1

%build
# >> build pre
Expand Down

0 comments on commit 9f89b56

Please sign in to comment.