- Fix crashes when a tracked service restarts too quickly (fdo #18573)

This commit is contained in:
Daniel Williams 2008-11-17 22:58:36 +00:00
parent 50bd528b2b
commit ba869b4769
2 changed files with 29 additions and 1 deletions

View File

@ -8,10 +8,12 @@
Summary: GLib bindings for D-Bus
Name: dbus-glib
Version: 0.76
Release: 2%{?dist}
Release: 3%{?dist}
URL: http://www.freedesktop.org/software/dbus/
Source0: http://dbus.freedesktop.org/releases/dbus-glib/%{name}-%{version}.tar.gz
Source1: dbus-bus-introspect.xml
# https://bugs.freedesktop.org/show_bug.cgi?id=18573
Patch0: dbus-gproxy-cancel.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=16114
Patch7: dbus-glib-0.74-getall-wincaps-to-uscore.patch
License: AFL and GPLv2+
@ -64,6 +66,7 @@ D-Bus tools written using the gtk+ GUI libaries
%prep
%setup -q
%patch0 -p1 -b .gproxy-cancel
%patch7 -p1 -b .getall-wincaps-to-uscore
%patch10 -p1 -b .bash-completion
@ -125,6 +128,9 @@ rm -rf %{buildroot}
%endif
%changelog
* Mon Nov 17 2008 Dan Williams <dcbw@redhat.com> - 0.76-3
- Fix crashes when a tracked service restarts too quickly (fdo #18573)
* Thu Jul 31 2008 David Zeuthen <davidz@redhat.com> - 0.76-2
- Add bash completion for dbus-send(1)

22
dbus-gproxy-cancel.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c
index 36d55f8..949a0a0 100644
--- a/dbus/dbus-gproxy.c
+++ b/dbus/dbus-gproxy.c
@@ -658,8 +658,15 @@ unassociate_proxies (gpointer key, gpointer val, gpointer user_data)
{
if (!priv->for_owner)
{
- g_assert (priv->associated);
- g_assert (priv->name_call == NULL);
+ /* If a service appeared and then vanished very quickly,
+ * it's conceivable we have an inflight request for
+ * GetNameOwner here. Cancel it.
+ * https://bugs.freedesktop.org/show_bug.cgi?id=18573
+ */
+ if (priv->name_call)
+ dbus_g_proxy_cancel_call (manager->bus_proxy, priv->name_call);
+
+ priv->name_call = NULL;
priv->associated = FALSE;
manager->unassociated_proxies = g_slist_prepend (manager->unassociated_proxies, proxy);