81 lines
2.3 KiB
Diff
81 lines
2.3 KiB
Diff
Index: servers/groupwise/soup-soap-response.c
|
|
===================================================================
|
|
--- servers/groupwise/soup-soap-response.c (revision 8790)
|
|
+++ servers/groupwise/soup-soap-response.c (working copy)
|
|
@@ -562,3 +562,19 @@ soup_xml_real_node (xmlNode *node)
|
|
node = node->next;
|
|
return node;
|
|
}
|
|
+
|
|
+
|
|
+int
|
|
+soup_soap_response_dump_response (SoupSoapResponse *response, FILE *buffer)
|
|
+{
|
|
+ xmlChar *xmlbuff;
|
|
+ int buffersize, ret;
|
|
+
|
|
+ SoupSoapResponsePrivate *priv = SOUP_SOAP_RESPONSE_GET_PRIVATE (response);
|
|
+ xmlDocDumpFormatMemory(priv->xmldoc, &xmlbuff, &buffersize, 1);
|
|
+
|
|
+ ret = fputs ((char *) xmlbuff, buffer);
|
|
+ xmlFree (xmlbuff);
|
|
+
|
|
+ return ret;
|
|
+}
|
|
Index: servers/groupwise/soup-soap-response.h
|
|
===================================================================
|
|
--- servers/groupwise/soup-soap-response.h (revision 8790)
|
|
+++ servers/groupwise/soup-soap-response.h (working copy)
|
|
@@ -61,6 +61,9 @@ SoupSoapParameter *soup_soap_response_ge
|
|
SoupSoapParameter *from,
|
|
const char *name);
|
|
|
|
+int soup_soap_response_dump_response (SoupSoapResponse *response, FILE *buffer);
|
|
+
|
|
+
|
|
G_END_DECLS
|
|
|
|
#endif
|
|
Index: servers/groupwise/e-gw-connection.c
|
|
===================================================================
|
|
--- servers/groupwise/e-gw-connection.c (revision 8790)
|
|
+++ servers/groupwise/e-gw-connection.c (working copy)
|
|
@@ -444,16 +444,18 @@ e_gw_connection_init (EGwConnection *cnc
|
|
priv->book_list = NULL;
|
|
priv->opts = NULL;
|
|
|
|
- if (g_getenv ("GROUPWISE_DEBUG")) {
|
|
+ /* README: We do not use libsoup logger and use our own as we need formatted output etc. */
|
|
+ /*
|
|
+ if (g_getenv ("GROUPWISE_DEBUG")) {
|
|
if (atoi (g_getenv ("GROUPWISE_DEBUG")) == 1) {
|
|
SoupLogger *logger;
|
|
|
|
- logger = soup_logger_new (SOUP_LOGGER_LOG_BODY,
|
|
- SOUP_LOGGER_LOG_BODY);
|
|
+ logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
|
|
soup_logger_attach (logger, priv->soup_session);
|
|
g_object_unref (logger);
|
|
}
|
|
}
|
|
+ */
|
|
}
|
|
|
|
GType
|
|
@@ -675,6 +677,15 @@ e_gw_connection_send_message (EGwConnect
|
|
|
|
/* process response */
|
|
response = soup_soap_message_parse_response (msg);
|
|
+
|
|
+ if (g_getenv ("GROUPWISE_DEBUG")) {
|
|
+
|
|
+ /* README: The stdout can be replaced with Evolution's
|
|
+ Logging framework also */
|
|
+
|
|
+ soup_soap_response_dump_response (response, stdout);
|
|
+ g_print ("\n------\n");
|
|
+ }
|
|
|
|
return response;
|
|
}
|