aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-01-17 22:54:10 +0800
committerDan Winship <danw@src.gnome.org>2008-01-17 22:54:10 +0800
commitcd14d28ca592cccf52c2c886334f266c1ac46359 (patch)
tree74279779edae98a0d2c97ff3ed0ce806b2e4b485 /calendar
parent8254ee63d40ea4b89db5131bed2ba81e49e8a267 (diff)
downloadgsoc2013-evolution-cd14d28ca592cccf52c2c886334f266c1ac46359.tar.gz
gsoc2013-evolution-cd14d28ca592cccf52c2c886334f266c1ac46359.tar.zst
gsoc2013-evolution-cd14d28ca592cccf52c2c886334f266c1ac46359.zip
Port to libsoup 2.4. Plug a leak.
* gui/itip-utils.c (itip_publish_comp): Port to libsoup 2.4. Plug a leak. svn path=/trunk/; revision=34846
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/itip-utils.c20
2 files changed, 15 insertions, 10 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d333e90f5d..70651d79e0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-17 Dan Winship <danw@gnome.org>
+
+ * gui/itip-utils.c (itip_publish_comp): Port to libsoup 2.4. Plug
+ a leak.
+
2008-01-17 Milan Crha <mcrha@redhat.com>
** Fix for bug #509879
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 63b0163ef9..beeec18e4b 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -36,9 +36,7 @@
#include <e-util/e-dialog-utils.h>
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-util.h>
-#include <libsoup/soup-session-async.h>
-#include <libsoup/soup-message.h>
-#include <libsoup/soup-uri.h>
+#include <libsoup/soup.h>
#include "calendar-config.h"
#include "itip-utils.h"
#include <time.h>
@@ -1748,7 +1746,7 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username,
icalcomponent *icomp = NULL;
SoupSession *session;
SoupMessage *msg;
- SoupUri *real_uri;
+ SoupURI *real_uri;
char *ical_string;
toplevel = e_cal_util_new_top_level ();
@@ -1773,18 +1771,19 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username,
return FALSE;
}
- real_uri->user = g_strdup (username);
- real_uri->passwd = g_strdup (password);
+ soup_uri_set_user (real_uri, username);
+ soup_uri_set_password (real_uri, password);
- /* build the SOAP message */
+ /* build the message */
msg = soup_message_new_from_uri (SOUP_METHOD_PUT, real_uri);
+ soup_uri_free (real_uri);
if (!msg) {
g_warning (G_STRLOC ": Could not build SOAP message");
g_object_unref (session);
return FALSE;
}
soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
- soup_message_set_request (msg, "text/calendar", SOUP_BUFFER_USER_OWNED,
+ soup_message_set_request (msg, "text/calendar", SOUP_MEMORY_TEMPORARY,
ical_string, strlen (ical_string));
/* send message to server */
@@ -1792,12 +1791,13 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username,
if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) {
g_warning(G_STRLOC ": Could not publish Free/Busy: %d: %s",
msg->status_code,
- soup_status_get_phrase (msg->status_code));
+ msg->reason_phrase);
+ g_object_unref (msg);
g_object_unref (session);
return FALSE;
}
- soup_uri_free (real_uri);
+ g_object_unref (msg);
g_object_unref (session);
return TRUE;