]> git.0d.be Git - empathy.git/commitdiff
log an error if SetContactInfo() fails
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 20 Oct 2010 10:57:31 +0000 (12:57 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 3 Nov 2010 07:45:23 +0000 (08:45 +0100)
libempathy-gtk/empathy-contact-widget.c

index 947fbfa766db1636ee62295b832d68034eca44d6..98a2fa7c0b094e0e0316a209c1acabf20c904a2f 100644 (file)
@@ -164,6 +164,24 @@ field_value_is_empty (TpContactInfoField *field)
   return TRUE;
 }
 
+static void
+set_contact_info_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  GError *error = NULL;
+
+  if (!tp_connection_set_contact_info_finish (TP_CONNECTION (source), result,
+        &error))
+    {
+      DEBUG ("SetContactInfo() failed: %s", error->message);
+      g_error_free (error);
+      return;
+    }
+
+  DEBUG ("SetContactInfo() succeeded");
+}
+
 static void
 contact_widget_save (EmpathyContactWidget *information)
 {
@@ -190,7 +208,7 @@ contact_widget_save (EmpathyContactWidget *information)
   if (information->details_to_set != NULL)
     {
       tp_connection_set_contact_info_async (connection,
-          information->details_to_set, NULL, NULL);
+          information->details_to_set, set_contact_info_cb, NULL);
       tp_contact_info_list_free (information->details_to_set);
       information->details_to_set = NULL;
     }