aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-11-28 04:30:51 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-11-28 04:30:51 +0800
commitdd896b147626e3f19477d1d19111fb691dbe45bd (patch)
tree84ad8db9773b2fbdec8c4d9e1e4144a74b38b2dd /addressbook/backend
parentf0770f394c98335e3944a4d2af7fea7fbccf6200 (diff)
downloadgsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.tar
gsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.tar.gz
gsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.tar.bz2
gsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.tar.lz
gsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.tar.xz
gsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.tar.zst
gsoc2013-evolution-dd896b147626e3f19477d1d19111fb691dbe45bd.zip
Remove "complete" field
2000-11-27 JP Rosevear <jpr@helixcode.com> * conduit/address-conduit.h: Remove "complete" field * conduit/address-conduit.c (print_local): Make it print useful debug info (print_remote): ditto (local_record_from_ecard): Make sure phone numbers get out to the pilot (ecard_from_remote_record): Set phone strings to "" if they are null (sequence_complete): unref the book view (view_cb): ref the book view (free_prepare): do nothing * backend/pas/pas-backend-file.c (pas_backend_file_book_view_free): Destroy the card lists with the rest of the view. (pas_backend_file_changes): Don't destroy the card lists here (pas_backend_file_book_view_free): Free the card/id lists in the change context here, the correct place. (pas_backend_file_changes): instead of here... 2000-11-27 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit.c (free_prepare): Ditto * conduits/calendar/calendar-conduit.c (free_prepare): Adjust free_prepare to the correct signal parameters. Don't actually do anything - there is a semantic discrepancy that needs to be resolved. 2000-11-27 JP Rosevear <jpr@helixcode.com> * providers/local/.cvsignore: shush svn path=/trunk/; revision=6681
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index d0ace222ad..2ff9d1164e 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -119,8 +119,24 @@ pas_backend_file_book_view_free(PASBackendFileBookView *book_view, void *closure
if (book_view->search_sexp)
gtk_object_unref(GTK_OBJECT(book_view->search_sexp));
g_free(book_view->search_context);
+
g_free(book_view->change_id);
+ if (book_view->change_context) {
+ g_list_foreach (book_view->change_context->add_cards, (GFunc)g_free, NULL);
+ g_list_foreach (book_view->change_context->add_ids, (GFunc)g_free, NULL);
+ g_list_foreach (book_view->change_context->mod_cards, (GFunc)g_free, NULL);
+ g_list_foreach (book_view->change_context->mod_ids, (GFunc)g_free, NULL);
+ g_list_foreach (book_view->change_context->del_cards, (GFunc)g_free, NULL);
+ g_list_foreach (book_view->change_context->del_ids, (GFunc)g_free, NULL);
+ g_list_free (book_view->change_context->add_cards);
+ g_list_free (book_view->change_context->add_ids);
+ g_list_free (book_view->change_context->mod_cards);
+ g_list_free (book_view->change_context->mod_ids);
+ g_list_free (book_view->change_context->del_cards);
+ g_list_free (book_view->change_context->del_ids);
+ }
g_free(book_view->change_context);
+
g_free(book_view);
}
@@ -546,11 +562,11 @@ pas_backend_file_changes (PASBackendFile *bf,
const PASBackendFileBookView *cnstview)
{
int db_error = 0;
- DB *db = bf->priv->file_db;
DBT id_dbt, vcard_dbt;
char *filename;
EDbHash *ehash;
GList *i, *v;
+ DB *db = bf->priv->file_db;
PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview;
PASBackendFileChangeContext *ctx = cnstview->change_context;
@@ -628,20 +644,6 @@ pas_backend_file_changes (PASBackendFile *bf,
pas_book_view_notify_complete (view->book_view);
}
-
- /* It's fine to do this now since the data has been handed off. */
- g_list_foreach (ctx->add_cards, (GFunc)g_free, NULL);
- g_list_foreach (ctx->add_ids, (GFunc)g_free, NULL);
- g_list_foreach (ctx->mod_cards, (GFunc)g_free, NULL);
- g_list_foreach (ctx->mod_ids, (GFunc)g_free, NULL);
- g_list_foreach (ctx->del_cards, (GFunc)g_free, NULL);
- g_list_foreach (ctx->del_ids, (GFunc)g_free, NULL);
- g_list_free (ctx->add_cards);
- g_list_free (ctx->add_ids);
- g_list_free (ctx->mod_cards);
- g_list_free (ctx->mod_ids);
- g_list_free (ctx->del_cards);
- g_list_free (ctx->del_ids);
}
static char *