[evolution-data-server] camel_provider_list(): Emit CRITICAL if camel_provider_load() fails.



commit 8a6ac1b22541cea10dc94eb5fc21a8e68c2ada19
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jul 1 07:50:59 2012 -0400

    camel_provider_list(): Emit CRITICAL if camel_provider_load() fails.
    
    Otherwise CamelProvider modules may be silently dropped without so much
    as a console message.

 camel/camel-provider.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index 964de76..f44f96d 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -337,11 +337,20 @@ camel_provider_list (gboolean load)
 		g_hash_table_foreach (module_table, add_to_list, &list);
 		for (w = list; w; w = w->next) {
 			CamelProviderModule *m = w->data;
+			GError *error = NULL;
 
 			if (!m->loaded) {
-				camel_provider_load (m->path, NULL);
+				camel_provider_load (m->path, &error);
 				m->loaded = 1;
 			}
+
+			if (error != NULL) {
+				g_critical (
+					"%s: %s: %s",
+					G_STRFUNC, m->path,
+					error->message);
+				g_error_free (error);
+			}
 		}
 		g_list_free (list);
 		list = NULL;



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