aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder-summary.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-07-04 11:40:58 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-07-04 11:40:58 +0800
commit6d76cc84a11eff91e2bc66d6c1214e8226c9539a (patch)
tree6787ab7bb1dbe23402ec25c479273c21f3bda9d0 /camel/camel-folder-summary.c
parentc9974759b3e9abbe2c649966095f544441f02f8b (diff)
downloadgsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.tar
gsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.tar.gz
gsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.tar.bz2
gsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.tar.lz
gsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.tar.xz
gsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.tar.zst
gsoc2013-evolution-6d76cc84a11eff91e2bc66d6c1214e8226c9539a.zip
Centralize creation of new UIDs for the summary.
svn path=/trunk/; revision=3885
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r--camel/camel-folder-summary.c10
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) {