1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
From 5083b22669f0d2102b72956a2b8afd9432303ce5 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Tue, 27 Nov 2012 08:46:51 +0100
Subject: [PATCH] soup: adapt to new libxml2 API from 2.9.0
* for more info see
https://mail.gnome.org/archives/xml/2012-August/msg00005.html
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
calendar/backends/caldav/e-cal-backend-caldav.c | 21 +++++++++++++++++++++
servers/google/libgdata/gdata-entry.c | 8 ++++++++
2 files changed, 29 insertions(+)
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index 5e7ecc4..b7f4afb 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -1038,8 +1038,13 @@ check_calendar_changed_on_server (ECalBackendCalDAV *cbdav)
soup_message_set_request (message,
"application/xml",
SOUP_MEMORY_COPY,
+#ifdef LIBXML2_NEW_BUFFER
+ (gchar *) xmlOutputBufferGetContent(buf),
+ xmlOutputBufferGetSize(buf));
+#else
(gchar *) buf->buffer->content,
buf->buffer->use);
+#endif
/* Send the request now */
send_and_handle_redirection (priv->session, message, NULL);
@@ -1180,8 +1185,13 @@ caldav_server_list_objects (ECalBackendCalDAV *cbdav, CalDAVObject **objs, gint
soup_message_set_request (message,
"application/xml",
SOUP_MEMORY_COPY,
+#ifdef LIBXML2_NEW_BUFFER
+ (gchar *) xmlOutputBufferGetContent(buf),
+ xmlOutputBufferGetSize(buf));
+#else
(gchar *) buf->buffer->content,
buf->buffer->use);
+#endif
/* Send the request now */
send_and_handle_redirection (priv->session, message, NULL);
@@ -1502,8 +1512,14 @@ caldav_receive_schedule_outbox_url (ECalBackendCalDAV *cbdav)
soup_message_set_request (message,
"application/xml",
SOUP_MEMORY_COPY,
+#ifdef LIBXML2_NEW_BUFFER
+ (gchar *) xmlOutputBufferGetContent(buf),
+ xmlOutputBufferGetSize(buf));
+#else
(gchar *) buf->buffer->content,
buf->buffer->use);
+#endif
+
/* Send the request now */
send_and_handle_redirection (priv->session, message, NULL);
@@ -1552,8 +1568,13 @@ caldav_receive_schedule_outbox_url (ECalBackendCalDAV *cbdav)
soup_message_set_request (message,
"application/xml",
SOUP_MEMORY_COPY,
+#ifdef LIBXML2_NEW_BUFFER
+ (gchar *) xmlOutputBufferGetContent(buf),
+ xmlOutputBufferGetSize(buf));
+#else
(gchar *) buf->buffer->content,
buf->buffer->use);
+#endif
/* Send the request now */
send_and_handle_redirection (priv->session, message, NULL);
diff --git a/servers/google/libgdata/gdata-entry.c b/servers/google/libgdata/gdata-entry.c
index ab69eb0..3f05b17 100644
--- a/servers/google/libgdata/gdata-entry.c
+++ b/servers/google/libgdata/gdata-entry.c
@@ -877,9 +877,17 @@ gdata_entry_new_from_xmlptr (xmlDocPtr doc, xmlNodePtr cur)
xmlOutputBufferFlush (buf);
if (buf->conv == NULL)
+#ifdef LIBXML2_NEW_BUFFER
+ xmlString = g_strdup ((gchar *) xmlOutputBufferGetContent(buf));
+#else
xmlString = g_strdup ((gchar *)buf->buffer->content);
+#endif
else
+#ifdef LIBXML2_NEW_BUFFER
+ xmlString = g_strdup ((gchar *) xmlBufContent(buf));
+#else
xmlString = g_strdup ((gchar *)buf->conv->content);
+#endif
xmlOutputBufferClose (buf);
}
--
1.8.0
|