summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2008-05-19 09:25:38 +0000
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-05-19 09:25:38 +0000
commit6cae79d52777083eb34cdfa6a3ed385bbf722382 (patch)
treec9a1d0ef323826420f1b20caccefc6c0aac282fd
parent2705d80ea65f395e1b1f31297684eb8d2207ff14 (diff)
downloadevolution-data-server-6cae79d52777083eb34cdfa6a3ed385bbf722382.tar.gz
Enable GROUPWISE_DEBUG logs.
2008-05-14 Sankar P <psankar@novell.com> * e-gw-connection.c: (e_gw_connection_init), (e_gw_connection_send_message): * soup-soap-response.c: (soup_soap_response_dump_response): * soup-soap-response.h: Enable GROUPWISE_DEBUG logs. ** Fix for bug #533058 svn path=/trunk/; revision=8804
-rw-r--r--servers/groupwise/ChangeLog10
-rw-r--r--servers/groupwise/e-gw-connection.c17
-rw-r--r--servers/groupwise/soup-soap-response.c16
-rw-r--r--servers/groupwise/soup-soap-response.h3
4 files changed, 43 insertions, 3 deletions
diff --git a/servers/groupwise/ChangeLog b/servers/groupwise/ChangeLog
index 9ee34376c..22fa26efb 100644
--- a/servers/groupwise/ChangeLog
+++ b/servers/groupwise/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-14 Sankar P <psankar@novell.com>
+
+ * e-gw-connection.c: (e_gw_connection_init),
+ (e_gw_connection_send_message):
+ * soup-soap-response.c: (soup_soap_response_dump_response):
+ * soup-soap-response.h:
+ Enable GROUPWISE_DEBUG logs.
+
+ ** Fix for bug #533058
+
2008-05-09 Sankar P <psankar@novell.com>
* e-gw-container.c: (free_node):
diff --git a/servers/groupwise/e-gw-connection.c b/servers/groupwise/e-gw-connection.c
index de863921f..f756cd7f8 100644
--- a/servers/groupwise/e-gw-connection.c
+++ b/servers/groupwise/e-gw-connection.c
@@ -444,16 +444,18 @@ e_gw_connection_init (EGwConnection *cnc, EGwConnectionClass *klass)
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 (EGwConnection *cnc, SoupSoapMessage *msg)
/* 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;
}
diff --git a/servers/groupwise/soup-soap-response.c b/servers/groupwise/soup-soap-response.c
index 1132158ec..f505e3f19 100644
--- a/servers/groupwise/soup-soap-response.c
+++ b/servers/groupwise/soup-soap-response.c
@@ -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;
+}
diff --git a/servers/groupwise/soup-soap-response.h b/servers/groupwise/soup-soap-response.h
index 32427e274..5db1bc37b 100644
--- a/servers/groupwise/soup-soap-response.h
+++ b/servers/groupwise/soup-soap-response.h
@@ -61,6 +61,9 @@ SoupSoapParameter *soup_soap_response_get_next_parameter_by_name (SoupSoapRespon
SoupSoapParameter *from,
const char *name);
+int soup_soap_response_dump_response (SoupSoapResponse *response, FILE *buffer);
+
+
G_END_DECLS
#endif