evolution-data-server r9630 - trunk/servers/groupwise



Author: mcrha
Date: Wed Oct  1 07:30:49 2008
New Revision: 9630
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9630&view=rev

Log:
2008-10-01  Milan Crha  <mcrha redhat com>

	** Part of fix for bug #511947

	* e-gw-connection.c: (e_gw_connection_send_message):
	Do not parse response when status indicates failure.



Modified:
   trunk/servers/groupwise/ChangeLog
   trunk/servers/groupwise/e-gw-connection.c

Modified: trunk/servers/groupwise/e-gw-connection.c
==============================================================================
--- trunk/servers/groupwise/e-gw-connection.c	(original)
+++ trunk/servers/groupwise/e-gw-connection.c	Wed Oct  1 07:30:49 2008
@@ -676,14 +676,27 @@
 e_gw_connection_send_message (EGwConnection *cnc, SoupSoapMessage *msg)
 {
 	SoupSoapResponse *response;
+	guint status;
 
 	g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), NULL);
 	g_return_val_if_fail (SOUP_IS_SOAP_MESSAGE (msg), NULL);
 
 	g_mutex_lock (cnc->priv->msg_lock);
-	soup_session_send_message (cnc->priv->soup_session, SOUP_MESSAGE (msg));
+	status = soup_session_send_message (cnc->priv->soup_session, SOUP_MESSAGE (msg));
 	g_mutex_unlock (cnc->priv->msg_lock);
 
+	if (!SOUP_STATUS_IS_SUCCESSFUL (status)) {
+		if (g_getenv ("GROUPWISE_DEBUG")) {
+			const char *error = soup_status_get_phrase (status);
+
+			if (!error)
+				error = "Unknown error";
+
+			g_debug ("%s: Failed to send message with error %d (%s)", G_STRFUNC, status, error);
+		}
+		return NULL;
+	}
+
 	/* process response */
 	response = soup_soap_message_parse_response (msg);
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]