Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-client/evolution/files: evolution-2.32.3-libxml2-2.9.patch
Date: Sun, 03 Mar 2013 14:31:25
Message-Id: 20130303143122.ACBDF2171E@flycatcher.gentoo.org
1 pacho 13/03/03 14:31:22
2
3 Added: evolution-2.32.3-libxml2-2.9.patch
4 Log:
5 Fix libxml2-2.9 compat (#459546 by jfernand)
6
7 (Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
8
9 Revision Changes Path
10 1.1 mail-client/evolution/files/evolution-2.32.3-libxml2-2.9.patch
11
12 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
13 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
14
15 Index: evolution-2.32.3-libxml2-2.9.patch
16 ===================================================================
17 --- plugins/caldav/caldav-browse-server.c.ori 2013-03-02 12:33:59.220751490 -0300
18 +++ plugins/caldav/caldav-browse-server.c 2013-03-02 16:47:55.601296985 -0300
19 @@ -63,6 +63,18 @@
20
21 typedef void (*process_message_cb) (GObject *dialog, const gchar *msg_path, guint status_code, const gchar *msg_body, gpointer user_data);
22
23 +static gconstpointer
24 +compat_libxml_output_buffer_get_content (xmlOutputBufferPtr buf,
25 + gsize *out_len)
26 +{
27 +#ifdef LIBXML2_NEW_BUFFER
28 + *out_len = xmlOutputBufferGetSize (buf);
29 + return xmlOutputBufferGetContent (buf);
30 +#else
31 + *out_len = buf->buffer->use;
32 + return buf->buffer->content;
33 +#endif
34 +}
35 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);
36
37 static gchar *
38 @@ -953,6 +965,8 @@
39 SoupSession *session;
40 SoupMessage *message;
41 xmlOutputBufferPtr buf;
42 + gconstpointer content;
43 + gsize length;
44 guint poll_id;
45 struct poll_data *pd;
46
47 @@ -977,9 +991,11 @@
48 xmlNodeDumpOutput (buf, doc, xmlDocGetRootElement (doc), 0, 1, NULL);
49 xmlOutputBufferFlush (buf);
50
51 + content = compat_libxml_output_buffer_get_content (buf, &length);
52 +
53 soup_message_headers_append (message->request_headers, "User-Agent", "Evolution/" VERSION);
54 soup_message_headers_append (message->request_headers, "Depth", depth_1 ? "1" : "0");
55 - soup_message_set_request (message, "application/xml", SOUP_MEMORY_COPY, (const gchar *) buf->buffer->content, buf->buffer->use);
56 + soup_message_set_request (message, "application/xml", SOUP_MEMORY_COPY, content, length);
57
58 /* Clean up the memory */
59 xmlOutputBufferClose (buf);