[evolution-couchdb] Use g_object_unref for CouchdbStructField's



commit 6aa1322cff73e9fd5c449459dc5bba1283d9e03d
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Wed Jun 9 10:48:53 2010 +0200

    Use g_object_unref for CouchdbStructField's

 addressbook/e-book-backend-couchdb.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index aecabd8..7bc76ca 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -768,7 +768,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 		if (list) {
 			desktopcouch_document_contact_set_email_addresses (document, list);
 
-			g_slist_foreach (list, (GFunc) couchdb_struct_field_unref, NULL);
+			g_slist_foreach (list, (GFunc) g_object_unref, NULL);
 			g_slist_free (list);
 		}
 
@@ -793,7 +793,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	if (list) {
 		desktopcouch_document_contact_set_phone_numbers (document, list);
 
-		g_slist_foreach (list, (GFunc) couchdb_struct_field_unref, NULL);
+		g_slist_foreach (list, (GFunc) g_object_unref, NULL);
 		g_slist_free (list);
 	}
 
@@ -814,7 +814,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	if (list) {
 		desktopcouch_document_contact_set_addresses (document, list);
 
-		g_slist_foreach (list, (GFunc) couchdb_struct_field_unref, NULL);
+		g_slist_foreach (list, (GFunc) g_object_unref, NULL);
 		g_slist_free (list);
 	}
 
@@ -839,7 +839,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	if (list != NULL) {
 		desktopcouch_document_contact_set_urls (document, list);
 
-		g_slist_foreach (list, (GFunc) couchdb_struct_field_unref, NULL);
+		g_slist_foreach (list, (GFunc) g_object_unref, NULL);
 		g_slist_free (list);
 	}
 
@@ -882,7 +882,7 @@ couch_document_from_contact (EBookBackendCouchDB *couchdb_backend, EContact *con
 	if (list != NULL) {
 		desktopcouch_document_contact_set_im_addresses (document, list);
 
-		g_slist_foreach (list, (GFunc) couchdb_struct_field_unref, NULL);
+		g_slist_foreach (list, (GFunc) g_object_unref, NULL);
 		g_slist_free (list);
 	}
 
@@ -1001,7 +1001,7 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 	couchdb_backend->database = couchdb_session_get_database (couchdb_backend->couchdb,
 								  "contacts",
 								  &error);
-	if (couchdb_backend->database != NULL) {
+	if (couchdb_backend->database == NULL) {
 		if (error) {
 			g_warning ("Could not get CouchDB database info: %s", error->message);
 			g_error_free (error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]