summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-02-04 18:43:49 +0000
committerChris Toshok <toshok@src.gnome.org>2004-02-04 18:43:49 +0000
commitc05d437076bae5639b9fddd49418d0e48f4ccc32 (patch)
tree13cc1a7ceffca5b89440e671d40e69da3aa3a046
parentcc01b41660498968aaa2cb94376fdf0aa02623bd (diff)
downloadevolution-data-server-c05d437076bae5639b9fddd49418d0e48f4ccc32.tar.gz
there's no reason to search for the card before removing it. the error
2004-02-04 Chris Toshok <toshok@ximian.com> * backends/file/e-book-backend-file.c (e_book_backend_file_remove_contacts): there's no reason to search for the card before removing it. the error condition is the same anyway, and it'll slow us down.
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/backends/file/e-book-backend-file.c9
2 files changed, 8 insertions, 8 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 01c8fef3a..3061ff9a4 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,12 @@
2004-02-04 Chris Toshok <toshok@ximian.com>
+ * backends/file/e-book-backend-file.c
+ (e_book_backend_file_remove_contacts): there's no reason to search
+ for the card before removing it. the error condition is the same
+ anyway, and it'll slow us down.
+
+2004-02-04 Chris Toshok <toshok@ximian.com>
+
[ fixes bug #53130 ]
* libedata-book/e-data-book-view.c (MAKE_REALLOC): this might end
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 2b580ef1e..855e155f7 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -170,7 +170,7 @@ e_book_backend_file_remove_contacts (EBookBackendSync *backend,
{
EBookBackendFile *bf = E_BOOK_BACKEND_FILE (backend);
DB *db = bf->priv->file_db;
- DBT id_dbt, vcard_dbt;
+ DBT id_dbt;
int db_error;
char *id;
GList *l;
@@ -181,14 +181,7 @@ e_book_backend_file_remove_contacts (EBookBackendSync *backend,
id = l->data;
string_to_dbt (id, &id_dbt);
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
- db_error = db->get (db, NULL, &id_dbt, &vcard_dbt, 0);
- if (0 != db_error) {
- rv = GNOME_Evolution_Addressbook_ContactNotFound;
- continue;
- }
-
db_error = db->del (db, NULL, &id_dbt, 0);
if (0 != db_error) {
rv = GNOME_Evolution_Addressbook_ContactNotFound;