[telepathy-gabble/master] fix the case where overlapping vCard changes are made

Dafydd Harries dafydd.harries at collabora.co.uk
Thu Aug 6 11:53:42 PDT 2009


When we receive a reply to an edit request, send off any changes that were
made in the meantime. Also, when a new edit reqeust is created, check for
pending set requests as well as pending get requests before generating a bogus
get request.
---
 src/vcard-manager.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index c2d9a29..bede447 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -173,6 +173,8 @@ gabble_vcard_manager_cache_quark (void)
 
 static void cache_entry_free (void *data);
 static gint cache_entry_compare (gconstpointer a, gconstpointer b);
+static void manager_patch_vcard (
+    GabbleVCardManager *self, LmMessageNode *vcard_node);
 
 static void
 gabble_vcard_manager_init (GabbleVCardManager *obj)
@@ -914,6 +916,9 @@ replace_reply_cb (GabbleConnection *conn,
 
   if (err != NULL)
     g_error_free (err);
+
+  /* If we've received more edit requests in the meantime, send them off. */
+  manager_patch_vcard (self, node);
 }
 
 static void
@@ -1244,7 +1249,7 @@ gabble_vcard_manager_edit (GabbleVCardManager *self,
   gabble_vcard_manager_invalidate_cache (self, base->self_handle);
   DEBUG ("checking if we have pending requests already");
   entry = cache_entry_get (self, base->self_handle);
-  if (!entry->pending_requests)
+  if (!priv->edit_pipeline_item && !entry->pending_requests)
     {
       DEBUG ("we don't, create one");
       /* create dummy GET request if neccessary */
-- 
1.5.6.5




More information about the telepathy-commits mailing list