virdbus: Report a debug message that dbus_watch_handle() has failed

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>
This commit is contained in:
Marc Hartmayer 2018-09-21 15:02:03 +02:00 committed by John Ferlan
parent eedf83ceca
commit 07e01beb35

View 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)