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



Author: msuman
Date: Mon Feb 25 04:55:53 2008
New Revision: 8528
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8528&view=rev

Log:
Patch from Milan Crha  <mcrha redhat com> ** Partial fix for bug #459468 (Do not report STATUS_OK when creation of new item failed, Check for NULL parameter and return with warning on console it that case)

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	Mon Feb 25 04:55:53 2008
@@ -1379,11 +1379,13 @@
 
        	*item = e_gw_item_new_from_soap_parameter (cnc->priv->user_email, container, param);
 
-
 	/* free memory */
         g_object_unref (response);
 	g_object_unref (msg);
 
+	if (!*item)
+		return E_GW_CONNECTION_STATUS_INVALID_OBJECT;
+
         return E_GW_CONNECTION_STATUS_OK;
 }
 
@@ -1747,9 +1749,12 @@
 e_gw_connection_get_date_from_string (const char *dtstring)
 {
         char *str2;
-        int i, j, len = strlen (dtstring);
+	int i, j, len;
 	time_t t;
 
+	g_return_val_if_fail (dtstring != NULL, 0);
+
+	len = strlen (dtstring);
         str2 = g_malloc0 (len+1);
         for (i = 0,j = 0; i < len; i++) {
                 if ((dtstring[i] != '-') && (dtstring[i] != ':')) {
@@ -3121,11 +3126,13 @@
 
 	*item = e_gw_item_new_from_soap_parameter (cnc->priv->user_email, "", param);
 
-
 	/* free memory */
         g_object_unref (response);
 	g_object_unref (msg);
 
+	if (!*item)
+		return E_GW_CONNECTION_STATUS_INVALID_OBJECT;
+
         return E_GW_CONNECTION_STATUS_OK;
 }
 
@@ -3181,11 +3188,13 @@
 
 	*item = e_gw_item_new_from_soap_parameter (cnc->priv->user_email, "", param);
 
-
 	/* free memory */
 	g_object_unref (response);
 	g_object_unref (msg);
 
+	if (!*item)
+		return E_GW_CONNECTION_STATUS_INVALID_OBJECT;
+
 	return E_GW_CONNECTION_STATUS_OK;
 }
 



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