public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in mail-client/evolution/files: evolution-2.32.3-libxml2-2.9.patch
@ 2013-03-03 14:31 Pacho Ramos (pacho)
  0 siblings, 0 replies; only message in thread
From: Pacho Ramos (pacho) @ 2013-03-03 14:31 UTC (permalink / raw
  To: gentoo-commits

pacho       13/03/03 14:31:22

  Added:                evolution-2.32.3-libxml2-2.9.patch
  Log:
  Fix libxml2-2.9 compat (#459546 by jfernand)
  
  (Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

Revision  Changes    Path
1.1                  mail-client/evolution/files/evolution-2.32.3-libxml2-2.9.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/evolution/files/evolution-2.32.3-libxml2-2.9.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/evolution/files/evolution-2.32.3-libxml2-2.9.patch?rev=1.1&content-type=text/plain

Index: evolution-2.32.3-libxml2-2.9.patch
===================================================================
--- 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);





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-03 14:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 14:31 [gentoo-commits] gentoo-x86 commit in mail-client/evolution/files: evolution-2.32.3-libxml2-2.9.patch Pacho Ramos (pacho)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox