66f62690bd
- 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).
57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
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);
|