[libvirt-glib 1/5] mainloop: improve handle operations debug messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make sure the watch ID and the address of the structure libvirt-glib
uses to watch the handle are always printed to make tracking operation
on the same watch easier.
---
 libvirt-glib/libvirt-glib-event.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libvirt-glib/libvirt-glib-event.c b/libvirt-glib/libvirt-glib-event.c
index c3eb3c8..f09d6c8 100644
--- a/libvirt-glib/libvirt-glib-event.c
+++ b/libvirt-glib/libvirt-glib-event.c
@@ -130,7 +130,7 @@ gvir_event_handle_dispatch(GIOChannel *source G_GNUC_UNUSED,
     if (condition & G_IO_ERR)
         events |= VIR_EVENT_HANDLE_ERROR;
 
-    g_debug("Dispatch handler %d %d %p\n", data->fd, events, data->opaque);
+    g_debug("Dispatch handler %p %d %d %d %p\n", data, data->watch, data->fd, events, data->opaque);
 
     (data->cb)(data->watch, data->fd, events, data->opaque);
 
@@ -166,7 +166,7 @@ gvir_event_handle_add(int fd,
     data->channel = g_io_channel_unix_new(fd);
     data->ff = ff;
 
-    g_debug("Add handle %d %d %p\n", data->fd, events, data->opaque);
+    g_debug("Add handle %p %d %d %d %p\n", data, data->watch, data->fd, events, data->opaque);
 
     data->source = g_io_add_watch(data->channel,
                                   cond,
@@ -278,7 +278,7 @@ gvir_event_handle_remove(int watch)
         goto cleanup;
     }
 
-    g_debug("Remove handle %d %d\n", watch, data->fd);
+    g_debug("Remove handle %p %d %d\n", data, watch, data->fd);
 
     if (!data->source)
         goto cleanup;
-- 
1.7.10.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]