[evolution-ews/gnome-2-28] Bug #661972 - Crash in ews_book_remove_contact_cb at e-book-backend-ews.c:881



commit 5d828d02ea4a39472faaae5129d0572282a8f558
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Mon Mar 12 15:54:22 2012 +0530

    Bug #661972 - Crash in ews_book_remove_contact_cb at e-book-backend-ews.c:881

 src/addressbook/e-book-backend-ews.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 4db9909..ebe6683 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -891,6 +891,7 @@ e_book_backend_ews_remove_contacts	(EBookBackend *backend,
 	EBookBackendEws *ebews;
 	EwsRemoveContact *remove_contact;
 	EBookBackendEwsPrivate *priv;
+	GSList *l, *copy = NULL;
  
 	ebews = E_BOOK_BACKEND_EWS (backend);
  
@@ -917,11 +918,15 @@ e_book_backend_ews_remove_contacts	(EBookBackend *backend,
 			return;
 		}
 
+		for (l = (GSList *) id_list; l != NULL; l = g_slist_next (id_list))
+		copy = g_slist_prepend (copy, g_strdup ((gchar *)l->data));
+		copy = g_slist_reverse (copy);
+
 		remove_contact = g_new0(EwsRemoveContact, 1);
 		remove_contact->ebews = g_object_ref(ebews);
 		remove_contact->book = g_object_ref(book);
 		remove_contact->opid = opid;
-		remove_contact->sl_ids = (GSList *) id_list;
+		remove_contact->sl_ids = copy;
 
 		e_ews_connection_delete_items_start (priv->cnc, EWS_PRIORITY_MEDIUM, (GSList *) id_list,
 						     EWS_HARD_DELETE, 0 , FALSE,



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