[evolution-kolab/ek-wip-porting] camel-kolab-imapx-metadata: handle missing server metadata protocol info more gracefully



commit 659848ea6e7b6a7c61f2304c37e99fac8e1f6570
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Fri Jul 13 18:07:30 2012 +0200

    camel-kolab-imapx-metadata: handle missing server metadata protocol info more gracefully

 src/libekolab/camel-kolab-imapx-metadata.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libekolab/camel-kolab-imapx-metadata.c b/src/libekolab/camel-kolab-imapx-metadata.c
index 1a1c138..11f81bd 100644
--- a/src/libekolab/camel-kolab-imapx-metadata.c
+++ b/src/libekolab/camel-kolab-imapx-metadata.c
@@ -50,8 +50,8 @@ camel_kolab_imapx_metadata_folder_metadata_new_from_imapx (CamelImapxMetadataAnn
 	GError *tmp_err = NULL;
 
 	/* man may be NULL */
-	g_assert ((proto > CAMEL_IMAPX_METADATA_PROTO_INVAL) &&
-	          (proto < CAMEL_IMAPX_METADATA_LAST_PROTO));
+	g_return_val_if_fail ((proto > CAMEL_IMAPX_METADATA_PROTO_INVAL) &&
+	                      (proto < CAMEL_IMAPX_METADATA_LAST_PROTO), NULL);
 	g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
 
 	if (man == NULL)
@@ -255,8 +255,8 @@ camel_kolab_imapx_metadata_update (CamelKolabImapxMetadata *kmd,
 
 	g_assert (kmd != NULL);
 	g_assert (md != NULL);
-	g_assert ((proto > CAMEL_IMAPX_METADATA_PROTO_INVAL) &&
-	          (proto < CAMEL_IMAPX_METADATA_LAST_PROTO));
+	g_return_if_fail ((proto > CAMEL_IMAPX_METADATA_PROTO_INVAL) &&
+	                  (proto < CAMEL_IMAPX_METADATA_LAST_PROTO));
 
 	g_hash_table_iter_init (&mbox_iter, md->mboxes);
 	while (g_hash_table_iter_next (&mbox_iter, &mbox_key, &mbox_value)) {



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