GNOME Bugzilla – Bug 660246
EBookBackendSqliteDB: Bad loop iteration
Last modified: 2011-09-29 11:48:14 UTC
Created attachment 197571 [details] [review] Proposed patch Please find attached the following patch for master and 3.2: *** e_book_backend_sqlitedb_remove_contacts: Fix removal of more than one contact The code was not properly iterating over the UID list and as a consequence, calling e_book_backend_sqlitedb_remove_contacts() with more than one UID would only remove the first UID in the list. ***
This is quite annoying because if one calls e_book_client_remove_contacts() with more than one UID, only the first UID gets removed from the SQLite summary but all them get removed from the backend. Then, the backend and the summary are no longer in sync and you get errors later such as: libebookbackend-WARNING **: e-book-backend-file.c:423: db->del failed with DB_NOTFOUND: No matching key/data pair found, uid: pas-id-4E81AF66000000A6 when trying to delete a contact with a UID that was returned by e_book_client_get_contacts_uids().
Thanks for the patch. Committed for E-D-S 3.2.1 and 3.3.1: http://git.gnome.org/browse/evolution-data-server/commit/?id=ca7ca9eb5c3208ddb368cf1b5f57a7c2e2ad7983 http://git.gnome.org/browse/evolution-data-server/commit/?h=gnome-3-2&id=e7c9bd036c7c430f1424a8c5b076e8b87723f36f