evolution-data-server r9872 - in trunk/calendar: . backends/caldav backends/http
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9872 - in trunk/calendar: . backends/caldav backends/http
- Date: Mon, 5 Jan 2009 14:11:18 +0000 (UTC)
Author: mcrha
Date: Mon Jan 5 14:11:18 2009
New Revision: 9872
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9872&view=rev
Log:
2009-01-05 Lubomir Rintel <lkundrak v3 sk>
** Fix for bug #566627
* backends/caldav/e-cal-backend-caldav.c:
(caldav_server_open_calendar), (check_calendar_changed_on_server),
(caldav_server_list_objects), (caldav_server_get_object),
(caldav_server_put_object), (caldav_server_delete_object):
* backends/http/e-cal-backend-http.c: (begin_retrieval_cb):
Check return value of soup_message_new before accessing it.
Modified:
trunk/calendar/ChangeLog
trunk/calendar/backends/caldav/e-cal-backend-caldav.c
trunk/calendar/backends/http/e-cal-backend-http.c
Modified: trunk/calendar/backends/caldav/e-cal-backend-caldav.c
==============================================================================
--- trunk/calendar/backends/caldav/e-cal-backend-caldav.c (original)
+++ trunk/calendar/backends/caldav/e-cal-backend-caldav.c Mon Jan 5 14:11:18 2009
@@ -939,6 +939,8 @@
/* FIXME: setup text_uri */
message = soup_message_new (SOUP_METHOD_OPTIONS, priv->uri);
+ if (message == NULL)
+ return GNOME_Evolution_Calendar_NoSuchCal;
soup_message_headers_append (message->request_headers,
"User-Agent", "Evolution/" VERSION);
@@ -1052,6 +1054,11 @@
if (!priv->ctag_supported)
return TRUE;
+ /* Prepare the soup message */
+ message = soup_message_new ("PROPFIND", priv->uri);
+ if (message == NULL)
+ return FALSE;
+
doc = xmlNewDoc ((xmlChar *) "1.0");
root = xmlNewNode (NULL, (xmlChar *) "propfind");
nsdav = xmlNewNs (root, (xmlChar *) "DAV:", NULL);
@@ -1065,8 +1072,6 @@
xmlNodeDumpOutput (buf, doc, root, 0, 1, NULL);
xmlOutputBufferFlush (buf);
- /* Prepare the soup message */
- message = soup_message_new ("PROPFIND", priv->uri);
soup_message_headers_append (message->request_headers,
"User-Agent", "Evolution/" VERSION);
soup_message_headers_append (message->request_headers,
@@ -1126,6 +1131,10 @@
gboolean result;
priv = E_CAL_BACKEND_CALDAV_GET_PRIVATE (cbdav);
+ /* Allocate the soup message */
+ message = soup_message_new ("REPORT", priv->uri);
+ if (message == NULL)
+ return FALSE;
/* Maybe we should just do a g_strdup_printf here? */
/* Prepare request body */
@@ -1165,7 +1174,6 @@
xmlOutputBufferFlush (buf);
/* Prepare the soup message */
- message = soup_message_new ("REPORT", priv->uri);
soup_message_headers_append (message->request_headers,
"User-Agent", "Evolution/" VERSION);
soup_message_headers_append (message->request_headers,
@@ -1217,6 +1225,8 @@
uri = caldav_generate_uri (cbdav, object->href);
message = soup_message_new (SOUP_METHOD_GET, uri);
g_free (uri);
+ if (message == NULL)
+ return GNOME_Evolution_Calendar_NoSuchCal;
soup_message_headers_append (message->request_headers,
"User-Agent", "Evolution/" VERSION);
@@ -1273,6 +1283,8 @@
uri = caldav_generate_uri (cbdav, object->href);
message = soup_message_new (SOUP_METHOD_PUT, uri);
g_free (uri);
+ if (message == NULL)
+ return GNOME_Evolution_Calendar_NoSuchCal;
soup_message_headers_append (message->request_headers,
"User-Agent", "Evolution/" VERSION);
@@ -1344,6 +1356,8 @@
uri = caldav_generate_uri (cbdav, object->href);
message = soup_message_new (SOUP_METHOD_DELETE, uri);
g_free (uri);
+ if (message == NULL)
+ return GNOME_Evolution_Calendar_NoSuchCal;
soup_message_headers_append (message->request_headers,
"User-Agent", "Evolution/" VERSION);
Modified: trunk/calendar/backends/http/e-cal-backend-http.c
==============================================================================
--- trunk/calendar/backends/http/e-cal-backend-http.c (original)
+++ trunk/calendar/backends/http/e-cal-backend-http.c Mon Jan 5 14:11:18 2009
@@ -483,6 +483,11 @@
/* create message to be sent to server */
soup_message = soup_message_new (SOUP_METHOD_GET, priv->uri);
+ if (soup_message == NULL) {
+ priv->is_loading = FALSE;
+ return FALSE;
+ }
+
soup_message_headers_append (soup_message->request_headers, "User-Agent",
"Evolution/" VERSION);
soup_message_set_flags (soup_message, SOUP_MESSAGE_NO_REDIRECT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]