[evolution-patches] patch for bug #305304



hi all

  Attached is the patch to fix bug number 305304.
  The '\n' character of description-field is
  separately  encoded as '\' and 'n'.
  Please review.

Regards,


Dinesh Layek
Novell Software Developement(I) Pvt. Ltd,
www.novell.com
Phone No. 080-25731856 Extn. 2140

Index: camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.63
diff -u -p -r1.63 camel-groupwise-folder.c
--- camel-groupwise-folder.c	27 Jul 2005 08:26:30 -0000	1.63
+++ camel-groupwise-folder.c	4 Aug 2005 08:33:45 -0000
@@ -1633,6 +1633,8 @@ convert_to_calendar (EGwItem *item, char
 	int recur_key = 0;
 	char **tmp;
 	const char *temp = NULL;
+	char *temp_str = NULL;
+	int index1,index2;
 
 	tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
 
@@ -1655,9 +1657,22 @@ convert_to_calendar (EGwItem *item, char
 	g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item));
 	
 	temp = e_gw_item_get_message (item);
-	if (temp)
-		g_string_append_printf (gstr, "DESCRIPTION:%s\n", e_gw_item_get_message (item));
+	temp_str = malloc ((sizeof (temp))*2+2);
+	index2 = 0;
 
+	for (index1 = 0;index1 <= strlen (temp); index1++) {
+		if(temp[index1]=='\n') {
+			temp_str[index2++] = '\\';
+			temp_str[index2++] = 'n';
+		}
+		else {
+			temp_str[index2++] = temp[index1];
+		}
+	}
+
+	if (temp)
+		g_string_append_printf (gstr, "DESCRIPTION:%s\n", temp_str);
+	
 	g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item));
 	g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item));
 	g_string_append_printf (gstr, "X-GWSHOW-AS:BUSY\n");
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.70
diff -u -p -r1.70 ChangeLog
--- ChangeLog	27 Jul 2005 08:26:30 -0000	1.70
+++ ChangeLog	4 Aug 2005 08:33:45 -0000
@@ -1,3 +1,8 @@
+2005-08-04 Dinesh Layek < LDinesh novell com >
+
+	* camel-groupwise-folder.c
+	(convert_to_calendar): encoded the new-line('\n') characters of description-field as \n (two different characters'\','n').
+
 2005-07-27  Parthasarathi Susarla <sparthasarathi novell com>
 	
 	* camel-groupwise-folder.c 
@@ -43,7 +48,7 @@
 	* camel-groupwise-store.c: Add check that uses parents password
 	for a proxy.
 	* camel-groupwise-folder.c: Use GetItems as GetQM is not valid on
-	proxy login.
+	
 
 2005-07-07  Parthasarathi Susarla <sparthasarathi novell com>
 	


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