- Add patch for RH bug #212106 (address book error on fresh install). - Add patch for RH bug #215702 (bad search filter for LDAP address books).f41
parent
632ead38c1
commit
66f62690bd
@ -0,0 +1,56 @@
|
|||||||
|
diff -up evolution-data-server-1.12.1/addressbook/backends/file/e-book-backend-file.c.db4 evolution-data-server-1.12.1/addressbook/backends/file/e-book-backend-file.c
|
||||||
|
--- evolution-data-server-1.12.1/addressbook/backends/file/e-book-backend-file.c.db4 2007-10-12 02:29:47.000000000 -0400
|
||||||
|
+++ evolution-data-server-1.12.1/addressbook/backends/file/e-book-backend-file.c 2007-10-19 11:56:03.000000000 -0400
|
||||||
|
@@ -1137,23 +1137,30 @@ e_book_backend_file_load_source (EBookBa
|
||||||
|
return db_error_to_status (db_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ db->close (db, 0);
|
||||||
|
+ db_error = db_create (&db, env, 0);
|
||||||
|
+ if (db_error != 0) {
|
||||||
|
+ g_warning ("db_create failed with %s", db_strerror (db_error));
|
||||||
|
+ g_free (dirname);
|
||||||
|
+ g_free (filename);
|
||||||
|
+ return db_error_to_status (db_error);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
db_error = (*db->open) (db, NULL, filename, NULL, DB_HASH, DB_THREAD, 0666);
|
||||||
|
}
|
||||||
|
|
||||||
|
- bf->priv->file_db = db;
|
||||||
|
-
|
||||||
|
if (db_error == 0) {
|
||||||
|
writable = TRUE;
|
||||||
|
} else {
|
||||||
|
db->close (db, 0);
|
||||||
|
-
|
||||||
|
db_error = db_create (&db, env, 0);
|
||||||
|
if (db_error != 0) {
|
||||||
|
g_warning ("db_create failed with %s", db_strerror (db_error));
|
||||||
|
g_free (dirname);
|
||||||
|
g_free (filename);
|
||||||
|
- return GNOME_Evolution_Addressbook_OtherError;
|
||||||
|
+ return db_error_to_status (db_error);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
db_error = (*db->open) (db, NULL, filename, NULL, DB_HASH, DB_RDONLY | DB_THREAD, 0666);
|
||||||
|
|
||||||
|
if (db_error != 0 && !only_if_exists) {
|
||||||
|
@@ -1178,7 +1185,7 @@ e_book_backend_file_load_source (EBookBa
|
||||||
|
g_warning ("db_create failed with %s", db_strerror (db_error));
|
||||||
|
g_free (dirname);
|
||||||
|
g_free (filename);
|
||||||
|
- return GNOME_Evolution_Addressbook_OtherError;
|
||||||
|
+ return db_error_to_status (db_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
db_error = (*db->open) (db, NULL, filename, NULL, DB_HASH, DB_CREATE | DB_THREAD, 0666);
|
||||||
|
@@ -1201,6 +1208,8 @@ e_book_backend_file_load_source (EBookBa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ bf->priv->file_db = db;
|
||||||
|
+
|
||||||
|
if (db_error != 0) {
|
||||||
|
bf->priv->file_db = NULL;
|
||||||
|
g_free (dirname);
|
@ -0,0 +1,72 @@
|
|||||||
|
--- evolution-data-server-1.8.0/addressbook/backends/ldap/e-book-backend-ldap.c.fix-ldap-query 2006-09-02 02:36:49.000000000 -0400
|
||||||
|
+++ evolution-data-server-1.8.0/addressbook/backends/ldap/e-book-backend-ldap.c 2007-07-02 14:21:14.000000000 -0400
|
||||||
|
@@ -3209,22 +3209,28 @@
|
||||||
|
char ** strings;
|
||||||
|
|
||||||
|
if (argc > 0) {
|
||||||
|
- int i;
|
||||||
|
+ int i, empty;
|
||||||
|
|
||||||
|
strings = g_new0(char*, argc+3);
|
||||||
|
strings[0] = g_strdup ("(&");
|
||||||
|
strings[argc+3 - 2] = g_strdup (")");
|
||||||
|
|
||||||
|
+ empty = 0;
|
||||||
|
for (i = 0; i < argc; i ++) {
|
||||||
|
GList *list_head = ldap_data->list;
|
||||||
|
if (!list_head)
|
||||||
|
break;
|
||||||
|
+ if (strlen (list_head->data) == 0)
|
||||||
|
+ empty++;
|
||||||
|
strings[argc - i] = list_head->data;
|
||||||
|
ldap_data->list = g_list_remove_link(list_head, list_head);
|
||||||
|
g_list_free_1(list_head);
|
||||||
|
}
|
||||||
|
|
||||||
|
- ldap_data->list = g_list_prepend(ldap_data->list, g_strjoinv(" ", strings));
|
||||||
|
+ if (empty == argc)
|
||||||
|
+ ldap_data->list = g_list_prepend(ldap_data->list, g_strdup(" "));
|
||||||
|
+ else
|
||||||
|
+ ldap_data->list = g_list_prepend(ldap_data->list, g_strjoinv(" ", strings));
|
||||||
|
|
||||||
|
for (i = 0 ; i < argc + 2; i ++)
|
||||||
|
g_free (strings[i]);
|
||||||
|
@@ -3246,22 +3252,28 @@
|
||||||
|
char ** strings;
|
||||||
|
|
||||||
|
if (argc > 0) {
|
||||||
|
- int i;
|
||||||
|
+ int i, empty;
|
||||||
|
|
||||||
|
strings = g_new0(char*, argc+3);
|
||||||
|
strings[0] = g_strdup ("(|");
|
||||||
|
strings[argc+3 - 2] = g_strdup (")");
|
||||||
|
|
||||||
|
+ empty = 0;
|
||||||
|
for (i = 0; i < argc; i ++) {
|
||||||
|
GList *list_head = ldap_data->list;
|
||||||
|
if (!list_head)
|
||||||
|
break;
|
||||||
|
+ if (strlen (list_head->data) == 0)
|
||||||
|
+ empty++;
|
||||||
|
strings[argc - i] = list_head->data;
|
||||||
|
ldap_data->list = g_list_remove_link(list_head, list_head);
|
||||||
|
g_list_free_1(list_head);
|
||||||
|
}
|
||||||
|
|
||||||
|
- ldap_data->list = g_list_prepend(ldap_data->list, g_strjoinv(" ", strings));
|
||||||
|
+ if (empty == argc)
|
||||||
|
+ ldap_data->list = g_list_prepend(ldap_data->list, g_strdup(" "));
|
||||||
|
+ else
|
||||||
|
+ ldap_data->list = g_list_prepend(ldap_data->list, g_strjoinv(" ", strings));
|
||||||
|
|
||||||
|
for (i = 0 ; i < argc + 2; i ++)
|
||||||
|
g_free (strings[i]);
|
||||||
|
@@ -3410,6 +3422,7 @@
|
||||||
|
char *ldap_attr = query_prop_to_ldap(propname);
|
||||||
|
|
||||||
|
if (strlen (str) == 0) {
|
||||||
|
+ ldap_data->list = g_list_prepend(ldap_data->list, g_strdup (""));
|
||||||
|
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
|
||||||
|
r->value.bool = FALSE;
|
||||||
|
return r;
|
Loading…
Reference in new issue