From b08e378e4df09ec7fb05b1e0f54a0fabd392e71f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 7 Aug 2012 15:50:24 +0100 Subject: [PATCH 7/9] YtsContact: debug when a contact gains, loses or is assumed to have a service --- ytstenut/yts-contact.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ytstenut/yts-contact.c b/ytstenut/yts-contact.c index 24656a5..c011315 100644 --- a/ytstenut/yts-contact.c +++ b/ytstenut/yts-contact.c @@ -28,6 +28,7 @@ #include #include +#include "ytstenut-internal.h" #include "yts-capability.h" #include "yts-contact-impl.h" #include "yts-contact-internal.h" @@ -119,6 +120,8 @@ _service_added (YtsContact *self, YtsContactPrivate *priv = GET_PRIVATE (self); const char *service_id = yts_service_get_id (service); + DEBUG ("contact=%s service=%s", yts_contact_get_id (self), service_id); + g_return_if_fail (service_id && *service_id); g_return_if_fail (!g_hash_table_lookup (priv->services, service_id)); @@ -140,6 +143,8 @@ _service_removed (YtsContact *self, YtsContactPrivate *priv = GET_PRIVATE (self); const char *service_id = yts_service_get_id (service); + DEBUG ("contact=%s service=%s", yts_contact_get_id (self), service_id); + g_return_if_fail (service_id && *service_id); if (!g_hash_table_remove (priv->services, service_id)) @@ -414,6 +419,8 @@ yts_contact_remove_service_by_id (YtsContact *self, YtsContactPrivate *priv = GET_PRIVATE (self); YtsService *service; + DEBUG ("contact=%s service=%s", yts_contact_get_id (self), service_id); + g_return_if_fail (service_id && *service_id); /* @@ -516,6 +523,8 @@ yts_contact_update_service_status (YtsContact *self, YtsContactPrivate *priv = GET_PRIVATE (self); YtsService *service; + DEBUG ("contact=%s service=%s fqc=%s", yts_contact_get_id (self), + service_id, fqc_id); service = g_hash_table_lookup (priv->services, service_id); g_return_if_fail (service); -- 1.7.10.4