evolution-data-server r9631 - branches/gnome-2-24/servers/groupwise



Author: mcrha
Date: Wed Oct  1 07:31:21 2008
New Revision: 9631
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9631&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:
   branches/gnome-2-24/servers/groupwise/ChangeLog
   branches/gnome-2-24/servers/groupwise/e-gw-connection.c

Modified: branches/gnome-2-24/servers/groupwise/e-gw-connection.c
==============================================================================
--- branches/gnome-2-24/servers/groupwise/e-gw-connection.c	(original)
+++ branches/gnome-2-24/servers/groupwise/e-gw-connection.c	Wed Oct  1 07:31:21 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]