From 0f7e44ae1ea5a497083dc0982626b7f2cea7d36a Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 8 Aug 2011 23:43:42 +0200 Subject: Blocking: don't critical if ContactBlockingCapabilities is missing Haze has a deny list, and ostensibly implements ContactBlocking, but doesn't really implement that property. Naughty Haze hackers. They should be blocked. --- libempathy/empathy-tp-contact-list.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'libempathy') diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index d947e7284..11990a9a2 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -821,7 +821,19 @@ list_get_contact_blocking_capabilities_cb (TpProxy *conn, EmpathyTpContactListPriv *priv = GET_PRIV (list); TpContactBlockingCapabilities caps; - g_return_if_fail (G_VALUE_HOLDS_UINT (value)); + if (in_error != NULL) { + DEBUG ("Get(Blocking, ContactBlockingCapabilities) on %s failed: %s", + tp_proxy_get_object_path (conn), + in_error->message); + return; + } + + if (!G_VALUE_HOLDS_UINT (value)) { + DEBUG ("Get(Blocking, ContactBlockingCapabilities) on %s returned a %s, not a uint", + tp_proxy_get_object_path (conn), + G_VALUE_TYPE_NAME (value)); + return; + } caps = g_value_get_uint (value); -- cgit v1.2.3