Blob Blame History Raw
From c1bc760d534aa057808e7d6503bda60ab9afa120 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Mon, 9 Jan 2017 16:58:50 -0600
Subject: [PATCH] Fix: libservices: properly watch writable DBus handles

e2128e7 introduced a typo such that DBUS_WATCH_WRITABLE was never checked
---
 lib/services/dbus.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/services/dbus.c b/lib/services/dbus.c
index 0748c86..fb3e867 100644
--- a/lib/services/dbus.c
+++ b/lib/services/dbus.c
@@ -503,10 +503,7 @@ pcmk_dbus_watch_dispatch(gpointer userdata)
     mainloop_io_t *client = dbus_watch_get_data(watch);
 
     crm_trace("Dispatching client %p: %s", client, dbus_watch_flags_to_string(flags));
-    if (enabled && is_set(flags, DBUS_WATCH_READABLE)) {
-        oom = !dbus_watch_handle(watch, flags);
-
-    } else if (enabled && is_set(flags, DBUS_WATCH_READABLE)) {
+    if (enabled && (flags & (DBUS_WATCH_READABLE|DBUS_WATCH_WRITABLE))) {
         oom = !dbus_watch_handle(watch, flags);
 
     } else if(enabled) {
-- 
1.8.3.1