aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-14 06:16:50 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-14 06:16:50 +0800
commit5a8fb211febd4eaa5731da0a18c4a30c19fb1f82 (patch)
tree357457390830f20399afd2185b11b87430b2376c /camel
parent69c9fbff698b3516ffc216fd8552736b9f040168 (diff)
downloadgsoc2013-evolution-5a8fb211febd4eaa5731da0a18c4a30c19fb1f82.tar.gz
gsoc2013-evolution-5a8fb211febd4eaa5731da0a18c4a30c19fb1f82.tar.zst
gsoc2013-evolution-5a8fb211febd4eaa5731da0a18c4a30c19fb1f82.zip
Don't add bogus uids to the uid array. Might fix bug #38868 (it's the only
2003-03-13 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.c (get_uids): Don't add bogus uids to the uid array. Might fix bug #38868 (it's the only way I can figure that camel_folder_get_message_info() could possibly return NULL for the Outbox folder). svn path=/trunk/; revision=20280
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-folder.c14
2 files changed, 14 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 9f2ffe93d8..9785e0dbcf 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2003-03-13 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-folder.c (get_uids): Don't add bogus uids to the uid
+ array. Might fix bug #38868 (it's the only way I can figure that
+ camel_folder_get_message_info() could possibly return NULL for the
+ Outbox folder).
+
2003-03-12 Not Zed <NotZed@Ximian.com>
* camel-object.c (remove_bag): removed, it was double-freeing the
@@ -95,7 +102,6 @@
convert any CRLF sequences into plain old line-feeds to work
around a bug in some local transport programs.
->>>>>>> 1.1757
2003-03-04 Jeffrey Stedfast <fejj@ximian.com>
* camel-object.h: s/class/klass in one place so that the header is
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 5da51d9385..ac48ba3a25 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -1014,7 +1014,7 @@ static GPtrArray *
get_uids(CamelFolder *folder)
{
GPtrArray *array;
- int i, count;
+ int i, j, count;
array = g_ptr_array_new();
@@ -1022,17 +1022,17 @@ get_uids(CamelFolder *folder)
count = camel_folder_summary_count(folder->summary);
g_ptr_array_set_size(array, count);
- for (i=0; i<count; i++) {
+ for (i = 0, j = 0; i < count; i++) {
CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i);
-
+
if (info) {
- array->pdata[i] = g_strdup(camel_message_info_uid(info));
+ array->pdata[j++] = g_strdup (camel_message_info_uid (info));
camel_folder_summary_info_free(folder->summary, info);
- } else {
- array->pdata[i] = g_strdup("xx unknown uid xx");
}
}
-
+
+ g_ptr_array_set_size (array, j);
+
return array;
}