Patch: strip recipients in split_recipients method
- From: Jose Dapena Paz <jdapena igalia com>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Patch: strip recipients in split_recipients method
- Date: Thu, 08 Nov 2007 12:38:53 +0100
Hi,
This patch forces an strip of recipients in split_recipients function
in tny-camel-common.c. This prevents this situation:
* Original string: [addr1 foo bar, addr2 foo bar, addr3 foo bar]
* Addresses obtained: [addr1 foo bar] (ok), [ addr2 foo bar] (BAD, gets
an extra space), [ addr3 foo bar] (BAD again).
With this change, we get proper [addr2 foo bar] and [addr3 foo bar]
This was affecting all set_recipient methods (set_cc, set_to, etc).
--
Jose Dapena Paz <jdapena igalia com>
Igalia
Index: libtinymail-camel/tny-camel-common.c
===================================================================
--- libtinymail-camel/tny-camel-common.c (revision 2922)
+++ libtinymail-camel/tny-camel-common.c (working copy)
@@ -213,6 +213,7 @@
if ((!is_quoted) && ((*tmp == ',') || (*tmp == ';'))) {
gchar *part;
part = g_strndup (start, tmp - start);
+ part = g_strstrip (part);
g_ptr_array_add (array, part);
start = tmp+1;
}
@@ -221,7 +222,7 @@
}
if (start != tmp)
- g_ptr_array_add (array, g_strdup (start));
+ g_ptr_array_add (array, g_strstrip (g_strdup (start)));
g_ptr_array_add (array, NULL);
return (gchar **) g_ptr_array_free (array, FALSE);
Index: ChangeLog
===================================================================
--- ChangeLog (revision 2922)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2007-11-08 Jose Dapena Paz <jdapena igalia com>
+
+ * libtinymail-camel/tny-camel-common.c:
+ (split_recipients): now we strip the obtained addresses to
+ avoid adding unmeaningful spaces to addresses.
+
2007-11-08 Philip Van Hoof <pvanhoof gnome org>
* Backported changes from Pre release 0.0.4 preparations
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]