if (error != NULL) {
fprintf(stderr, "%s\n", error->message);
+ return 1;
}
e_book_get_addressbooks(&source_list, &error);
if (error != NULL) {
fprintf(stderr, "%s\n", error->message);
+ return 1;
}
if (search_filter != NULL) {
for (s = sources ; s; s = s->next) {
source = E_SOURCE(s->data);
book = e_book_new(source, &error);
+
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error->message);
+ return 1;
+ }
+
e_book_open(book, TRUE, &error);
+
+
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error->message);
+ return 1;
+ }
+
e_book_get_contacts(book, query, &contacts, &error);
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error->message);
+ return 1;
+ }
for (c = contacts; c; c = c->next) {
dump_as_vcard(E_CONTACT(c->data), 1);