]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virdbus: Report a debug message that dbus_watch_handle() has failed
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Fri, 21 Sep 2018 13:02:03 +0000 (15:02 +0200)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 25 Sep 2018 23:27:47 +0000 (19:27 -0400)
Report a debug message if dbus_watch_handle() returns FALSE.
dbus_watch_handle() returns FALSE if there wasn't enough memory for
reading or writing.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/virdbus.c

index 49c8b3c1ea82059d2d03220279f1d849b35f2b73..3993bcb86053e9cb69b25506ff6dcc718cd4b2a0 100644 (file)
@@ -197,7 +197,8 @@ static void virDBusWatchCallback(int fdatch ATTRIBUTE_UNUSED,
     if (events & VIR_EVENT_HANDLE_HANGUP)
         dbus_flags |= DBUS_WATCH_HANGUP;
 
-    (void)dbus_watch_handle(watch, dbus_flags);
+    if (dbus_watch_handle(watch, dbus_flags) == FALSE)
+        VIR_DEBUG("dbus_watch_handle() returned FALSE");
 
     dbus_connection_ref(info->bus);
     while (dbus_connection_dispatch(info->bus) == DBUS_DISPATCH_DATA_REMAINS)