mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-26 00:55:14 +00:00
44 lines
1.6 KiB
Groff
44 lines
1.6 KiB
Groff
--- plugins/caldav/caldav-browse-server.c.ori 2013-03-02 12:33:59.220751490 -0300
|
|
+++ plugins/caldav/caldav-browse-server.c 2013-03-02 16:47:55.601296985 -0300
|
|
@@ -63,6 +63,18 @@
|
|
|
|
typedef void (*process_message_cb) (GObject *dialog, const gchar *msg_path, guint status_code, const gchar *msg_body, gpointer user_data);
|
|
|
|
+static gconstpointer
|
|
+compat_libxml_output_buffer_get_content (xmlOutputBufferPtr buf,
|
|
+ gsize *out_len)
|
|
+{
|
|
+#ifdef LIBXML2_NEW_BUFFER
|
|
+ *out_len = xmlOutputBufferGetSize (buf);
|
|
+ return xmlOutputBufferGetContent (buf);
|
|
+#else
|
|
+ *out_len = buf->buffer->use;
|
|
+ return buf->buffer->content;
|
|
+#endif
|
|
+}
|
|
static void send_xml_message (xmlDocPtr doc, gboolean depth_1, const gchar *url, GObject *dialog, process_message_cb cb, gpointer cb_user_data, const gchar *info);
|
|
|
|
static gchar *
|
|
@@ -953,6 +965,8 @@
|
|
SoupSession *session;
|
|
SoupMessage *message;
|
|
xmlOutputBufferPtr buf;
|
|
+ gconstpointer content;
|
|
+ gsize length;
|
|
guint poll_id;
|
|
struct poll_data *pd;
|
|
|
|
@@ -977,9 +991,11 @@
|
|
xmlNodeDumpOutput (buf, doc, xmlDocGetRootElement (doc), 0, 1, NULL);
|
|
xmlOutputBufferFlush (buf);
|
|
|
|
+ content = compat_libxml_output_buffer_get_content (buf, &length);
|
|
+
|
|
soup_message_headers_append (message->request_headers, "User-Agent", "Evolution/" VERSION);
|
|
soup_message_headers_append (message->request_headers, "Depth", depth_1 ? "1" : "0");
|
|
- soup_message_set_request (message, "application/xml", SOUP_MEMORY_COPY, (const gchar *) buf->buffer->content, buf->buffer->use);
|
|
+ soup_message_set_request (message, "application/xml", SOUP_MEMORY_COPY, content, length);
|
|
|
|
/* Clean up the memory */
|
|
xmlOutputBufferClose (buf);
|