From 34aaf812b1b4a5c2401c5f832c5094a05033a3e4 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 21 Feb 2001 17:39:29 +0000 Subject: Made this pay attention to the return value of e_sexp_parse. 2001-02-21 Christopher James Lahey * backend/pas/pas-backend-file.c (pas_backend_file_search): Made this pay attention to the return value of e_sexp_parse. * gui/component/select-names/e-select-names-text-model.c (e_select_names_text_model_activate_obj): Fixed a const inconsistency here. svn path=/trunk/; revision=8321 --- addressbook/backend/pas/pas-backend-file.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'addressbook/backend/pas') diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c index e46bbd3976..970dbac105 100644 --- a/addressbook/backend/pas/pas-backend-file.c +++ b/addressbook/backend/pas/pas-backend-file.c @@ -478,6 +478,7 @@ pas_backend_file_search (PASBackendFile *bf, DB *db = bf->priv->file_db; DBT id_dbt, vcard_dbt; int i; + int esexp_error; PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview; if (!bf->priv->loaded) @@ -498,7 +499,12 @@ pas_backend_file_search (PASBackendFile *bf, } e_sexp_input_text(view->search_sexp, view->search, strlen(view->search)); - e_sexp_parse(view->search_sexp); + esexp_error = e_sexp_parse(view->search_sexp); + + if (esexp_error == -1) { + pas_book_view_notify_complete (view->book_view); + return; + } db_error = db->seq(db, &id_dbt, &vcard_dbt, R_FIRST); @@ -521,10 +527,9 @@ pas_backend_file_search (PASBackendFile *bf, if (db_error == -1) { g_warning ("pas_backend_file_search: error building list\n"); } - else { - pas_book_view_notify_add (view->book_view, cards); - pas_book_view_notify_complete (view->book_view); - } + + pas_book_view_notify_add (view->book_view, cards); + pas_book_view_notify_complete (view->book_view); /* ** It's fine to do this now since the data has been handed off. -- cgit v1.2.3