[evolution-data-server] Fix imapx_parse_flags to not just return the first UID repeatedly, export it.



commit 768157a2b16bddac76aacb0a2d49ac59c9df10cf
Author: David Woodhouse <David Woodhouse intel com>
Date:   Sat Jun 19 12:37:48 2010 +0100

    Fix imapx_parse_flags to not just return the first UID repeatedly, export it.

 camel/providers/imapx/camel-imapx-utils.c |    5 ++---
 camel/providers/imapx/camel-imapx-utils.h |    1 +
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
index 8e1da66..2e99dcd 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -33,7 +33,6 @@ imapx_tokenise (register const gchar *str, register guint len)
 
 static void imapx_namespace_clear (CamelIMAPXStoreNamespace **ns);
 static const gchar * rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo);
-static GPtrArray *imapx_parse_uids (CamelIMAPXStream *is, CamelException *ex);
 
 /* flag table */
 static struct {
@@ -1528,7 +1527,7 @@ generate_uids_from_sequence (GPtrArray *uids, guint32 begin_uid, guint32 end_uid
 		g_ptr_array_add (uids, GUINT_TO_POINTER (i));
 }
 
-static GPtrArray *
+GPtrArray *
 imapx_parse_uids (CamelIMAPXStream *is, CamelException *ex)
 {
 	GPtrArray *uids = g_ptr_array_new ();
@@ -1550,7 +1549,7 @@ imapx_parse_uids (CamelIMAPXStream *is, CamelException *ex)
 			generate_uids_from_sequence (uids, uid1, uid2);
 			g_strfreev (seq);
 		} else {
-			guint32 uid = strtoul ((gchar *) token, NULL, 10);
+			guint32 uid = strtoul ((gchar *) splits[i], NULL, 10);
 			g_ptr_array_add (uids, GUINT_TO_POINTER (uid));
 		}
 	}
diff --git a/camel/providers/imapx/camel-imapx-utils.h b/camel/providers/imapx/camel-imapx-utils.h
index e7275e0..2084fc7 100644
--- a/camel/providers/imapx/camel-imapx-utils.h
+++ b/camel/providers/imapx/camel-imapx-utils.h
@@ -61,6 +61,7 @@ enum {
 
 /* ********************************************************************** */
 
+GPtrArray *imapx_parse_uids (CamelIMAPXStream *is, CamelException *ex);
 void imapx_parse_flags(struct _CamelIMAPXStream *stream, guint32 *flagsp, struct _CamelFlag **user_flagsp, CamelException *ex);
 void imapx_write_flags(CamelStream *stream, guint32 flags, struct _CamelFlag *user_flags, CamelException *ex);
 gboolean imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder);



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