summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-06-19 12:37:48 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-06-28 13:29:19 +0100
commit0895dac4c2c9bd800abb28984fe2ee50428773fa (patch)
tree03436d1aacfef387b1678190e326d9d8c1bbb339
parentcbad98d6695491eb95dcf7a74cbf7fdba6fa3abd (diff)
downloadevolution-data-server-0895dac4c2c9bd800abb28984fe2ee50428773fa.tar.gz
Fix imapx_parse_flags to not just return the first UID repeatedly, export it.
(cherry picked from commit 768157a2b16bddac76aacb0a2d49ac59c9df10cf)
-rw-r--r--camel/providers/imapx/camel-imapx-utils.c5
-rw-r--r--camel/providers/imapx/camel-imapx-utils.h1
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 1fc96f3f8..f5237dff0 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -39,7 +39,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 {
@@ -1529,7 +1528,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 ();
@@ -1551,7 +1550,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 9f2c4c3ae..6215afaf5 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 (struct _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);