diff options
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r-- | camel/camel-folder-summary.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 1d4352ed67..6ccf2bc7d5 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -269,6 +269,12 @@ guint32 camel_folder_summary_next_uid(CamelFolderSummary *s) return uid; } +char * +camel_folder_summary_next_uid_string (CamelFolderSummary *s) +{ + return g_strdup_printf ("%u", camel_folder_summary_next_uid (s)); +} + /* loads the content descriptions, recursively */ static CamelMessageContentInfo * perform_content_info_load(CamelFolderSummary *s, FILE *in) @@ -412,7 +418,7 @@ void camel_folder_summary_add(CamelFolderSummary *s, CamelMessageInfo *info) return; retry: if (info->uid == NULL) { - info->uid = g_strdup_printf("%u", s->nextuid++); + info->uid = camel_folder_summary_next_uid_string (s); } if (g_hash_table_lookup(s->messages_uid, info->uid)) { g_warning("Trying to insert message with clashing uid. new uid re-assigned"); @@ -453,7 +459,7 @@ CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *s, Ca /* FIXME: better uid assignment method? */ if (info->uid == NULL) { - info->uid = g_strdup_printf("%u", s->nextuid++); + info->uid = camel_folder_summary_next_uid_string (s); } if (p->index) { |