r1620 - in /unstable/evolution-data-server/debian: changelog control patches/02_fix-warning-in_source_get_uri.patch

corsac at users.alioth.debian.org corsac at users.alioth.debian.org
Mon May 17 19:46:46 UTC 2010


Author: corsac
Date: Mon May 17 19:46:37 2010
New Revision: 1620

URL: http://svn.debian.org/wsvn/pkg-evolution/?sc=1&rev=1620
Log:
* debian/patches:
  - 02_fix-warning-in_source_get_uri added, fix e_source_get_uri() called on
    source with no absolute URI.                              closes: #582029

Added:
    unstable/evolution-data-server/debian/patches/02_fix-warning-in_source_get_uri.patch
Modified:
    unstable/evolution-data-server/debian/changelog
    unstable/evolution-data-server/debian/control

Modified: unstable/evolution-data-server/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-evolution/unstable/evolution-data-server/debian/changelog?rev=1620&op=diff
==============================================================================
--- unstable/evolution-data-server/debian/changelog (original)
+++ unstable/evolution-data-server/debian/changelog Mon May 17 19:46:37 2010
@@ -2,8 +2,11 @@
 
   * debian/control:
     - adjust -dev packages dependencies according to .pc files.
-
- -- Yves-Alexis Perez <corsac at debian.org>  Mon, 17 May 2010 20:27:16 +0200
+  * debian/patches:
+    - 02_fix-warning-in_source_get_uri added, fix e_source_get_uri() called on
+      source with no absolute URI.                              closes: #582029
+
+ -- Yves-Alexis Perez <corsac at debian.org>  Mon, 17 May 2010 21:45:06 +0200
 
 evolution-data-server (2.30.1-2) unstable; urgency=low
 

Modified: unstable/evolution-data-server/debian/control
URL: http://svn.debian.org/wsvn/pkg-evolution/unstable/evolution-data-server/debian/control?rev=1620&op=diff
==============================================================================
--- unstable/evolution-data-server/debian/control (original)
+++ unstable/evolution-data-server/debian/control Mon May 17 19:46:37 2010
@@ -223,7 +223,6 @@
          libedataserver1.2-dev,
          libebook1.2-dev,
          libdbus-glib-1-dev
-
 Description: Backend library for evolution address books (development files)
  Evolution is the integrated mail, calendar, task and address book
  distributed suite from Novell, Inc.

Added: unstable/evolution-data-server/debian/patches/02_fix-warning-in_source_get_uri.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/unstable/evolution-data-server/debian/patches/02_fix-warning-in_source_get_uri.patch?rev=1620&op=file
==============================================================================
--- unstable/evolution-data-server/debian/patches/02_fix-warning-in_source_get_uri.patch (added)
+++ unstable/evolution-data-server/debian/patches/02_fix-warning-in_source_get_uri.patch Mon May 17 19:46:37 2010
@@ -1,0 +1,109 @@
+commit bf47a23ee4994597ca0a8757edd5ff0798435517
+Author: Milan Crha <mcrha at redhat.com>
+Date:   Thu May 6 19:44:34 2010 +0200
+
+    e_cal_new_from_uri/e_cal_open_default emits runtime warning
+    
+    The warning is "e_source_get_uri () called on source with no absolute URI!"
+    and it's caused by freeing the ESourceList before ECal creation.
+    This change is fixing the issue.
+
+diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
+index d1dfdac..7de9052 100644
+--- a/calendar/libecal/e-cal.c
++++ b/calendar/libecal/e-cal.c
+@@ -879,23 +879,28 @@ e_cal_new (ESource *source, ECalSourceType type)
+ 
+ /* for each known source calls check_func, which should return TRUE if the required
+    source have been found. Function returns NULL or the source on which was returned
+-   TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref. */
++   TRUE by the check_func. Non-NULL pointer should be unreffed by g_object_unref.
++
++   'sources' is an output parameter and cannot be NULL. When returned non-NULL, then
++   should be freed with g_object_unref function. */
+ static ESource *
+-search_known_sources (ECalSourceType type, gboolean (*check_func)(ESource *source, gpointer user_data), gpointer user_data, GError **error)
++search_known_sources (ECalSourceType type, gboolean (*check_func)(ESource *source, gpointer user_data), gpointer user_data, ESourceList **sources, GError **error)
+ {
+-	ESourceList *sources;
+ 	ESource *res = NULL;
+ 	GSList *g;
+ 	GError *err = NULL;
+ 
++	g_return_val_if_fail (sources != NULL, NULL);
+ 	g_return_val_if_fail (check_func != NULL, NULL);
+ 
+-	if (!e_cal_get_sources (&sources, type, &err)) {
++	*sources = NULL;
++
++	if (!e_cal_get_sources (sources, type, &err)) {
+ 		g_propagate_error (error, err);
+ 		return NULL;
+ 	}
+ 
+-	for (g = e_source_list_peek_groups (sources); g; g = g->next) {
++	for (g = e_source_list_peek_groups (*sources); g; g = g->next) {
+ 		ESourceGroup *group = E_SOURCE_GROUP (g->data);
+ 		GSList *s;
+ 
+@@ -912,8 +917,6 @@ search_known_sources (ECalSourceType type, gboolean (*check_func)(ESource *sourc
+ 			break;
+ 	}
+ 
+-	g_object_unref (sources);
+-
+ 	return res;
+ }
+ 
+@@ -944,16 +947,19 @@ check_uri (ESource *source, gpointer uri)
+ ECal *
+ e_cal_new_from_uri (const gchar *uri, ECalSourceType type)
+ {
++	ESourceList *sources = NULL;
+ 	ESource *source;
+ 	ECal *cal;
+ 
+-	source = search_known_sources (type, check_uri, (gpointer) uri, NULL);
++	source = search_known_sources (type, check_uri, (gpointer) uri, &sources, NULL);
+ 	if (!source)
+ 		source = e_source_new_with_absolute_uri ("", uri);
+ 
+ 	cal = e_cal_new (source, type);
+ 
+ 	g_object_unref (source);
++	if (sources)
++		g_object_unref (sources);
+ 
+ 	return cal;
+ }
+@@ -4057,6 +4063,7 @@ check_default (ESource *source, gpointer data)
+ gboolean
+ e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointer data, GError **error)
+ {
++	ESourceList *sources = NULL;
+ 	GError *err = NULL;
+ 	ESource *default_source;
+ 	gboolean res = TRUE;
+@@ -4064,9 +4071,11 @@ e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointe
+ 	e_return_error_if_fail (ecal != NULL, E_CALENDAR_STATUS_INVALID_ARG);
+ 	*ecal = NULL;
+ 
+-	default_source = search_known_sources (type, check_default, NULL, &err);
++	default_source = search_known_sources (type, check_default, NULL, &sources, &err);
+ 
+ 	if (err) {
++		if (sources)
++			g_object_unref (sources);
+ 		g_propagate_error (error, err);
+ 		return FALSE;
+ 	}
+@@ -4105,6 +4114,9 @@ e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointe
+ 		*ecal = NULL;
+ 	}
+ 
++	if (sources)
++		g_object_unref (sources);
++
+ 	return res;
+ }
+ 




More information about the pkg-evolution-commits mailing list