Skip to content

Commit

Permalink
[glib] Silence "Rejected send message" D-Bus errors. Fixes JB#33651
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
monich committed Dec 3, 2015
1 parent e17d031 commit aec9288
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 aec9288

Please sign in to comment.