evolution-data-server r8605 - trunk/camel/providers/groupwise



Author: psankar
Date: Tue Apr  1 07:42:36 2008
New Revision: 8605
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8605&view=rev

Log:
2008-04-01  Sankar P  <psankar novell com>

	** Fix for bug #525485

	* camel-groupwise-folder.c: (groupwise_folder_item_to_msg):
	Removed some infinite loops and corrected the conditional statement.




Modified:
   trunk/camel/providers/groupwise/ChangeLog
   trunk/camel/providers/groupwise/camel-groupwise-folder.c

Modified: trunk/camel/providers/groupwise/camel-groupwise-folder.c
==============================================================================
--- trunk/camel/providers/groupwise/camel-groupwise-folder.c	(original)
+++ trunk/camel/providers/groupwise/camel-groupwise-folder.c	Tue Apr  1 07:42:36 2008
@@ -1713,19 +1713,22 @@
 						status = e_gw_connection_get_attachment_base64 (cnc,
 								attach->id, t_offset, MAX_ATTACHMENT_SIZE,
 								(const char **)&t_attach, &t_len, &offset);
-						if (status == E_GW_CONNECTION_STATUS_OK && t_len) {
-							gsize len_iter = 0;
-							char *temp = NULL;
-
-							temp = g_base64_decode(t_attach, &len_iter);
-							gstr = g_string_append_len (gstr, temp, len_iter);
-							g_free (temp);
-							len += len_iter;
+						if (status == E_GW_CONNECTION_STATUS_OK) {
+
+							if (t_len) {
+								gsize len_iter = 0;
+								char *temp = NULL;
+
+								temp = g_base64_decode(t_attach, &len_iter);
+								gstr = g_string_append_len (gstr, temp, len_iter);
+								g_free (temp);
+								len += len_iter;
+								g_free (t_attach);
+								t_attach = NULL;
+							}
 							t_offset = offset;
-							g_free (t_attach);
-							t_attach = NULL;
 						}
-					} while (offset);
+					} while (t_offset);
 					body = gstr->str;
 					body_len = len;
 					g_string_free (gstr, FALSE);
@@ -1851,18 +1854,21 @@
 						status = e_gw_connection_get_attachment_base64 (cnc,
 								attach->id, t_offset, MAX_ATTACHMENT_SIZE,
 								(const char **)&t_attach, &t_len, &offset);
-						if (status == E_GW_CONNECTION_STATUS_OK && t_len) {
-							gsize len_iter = 0;
-							char *temp = NULL;
-
-							temp = g_base64_decode(t_attach, &len_iter);
-							gstr = g_string_append_len (gstr, temp, len_iter);
-							g_free (temp);
-							len += len_iter;
+						if (status == E_GW_CONNECTION_STATUS_OK) {
+
+							if (t_len) {
+								gsize len_iter = 0;
+								char *temp = NULL;
+
+								temp = g_base64_decode(t_attach, &len_iter);
+								gstr = g_string_append_len (gstr, temp, len_iter);
+								g_free (temp);
+								len += len_iter;
+								g_free (t_attach);
+								t_attach = NULL;
+								t_len = 0;
+							}
 							t_offset = offset;
-							g_free (t_attach);
-							t_attach = NULL;
-							t_len = 0;
 						}
 					} while (t_offset);
 					attachment =  gstr->str;



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