evolution-data-server r9833 - trunk/camel/providers/imap
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9833 - trunk/camel/providers/imap
- Date: Mon, 15 Dec 2008 12:06:02 +0000 (UTC)
Author: mcrha
Date: Mon Dec 15 12:06:01 2008
New Revision: 9833
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9833&view=rev
Log:
2008-12-15 Milan Crha <mcrha redhat com>
** Fix for bug #558744
* camel-imap-journal.c: (copy_uids_array), (camel_imap_journal_log):
Make own copy of the parameters, caller will free it for sure.
Modified:
trunk/camel/providers/imap/ChangeLog
trunk/camel/providers/imap/camel-imap-journal.c
Modified: trunk/camel/providers/imap/camel-imap-journal.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-journal.c (original)
+++ trunk/camel/providers/imap/camel-imap-journal.c Mon Dec 15 12:06:01 2008
@@ -160,6 +160,25 @@
}
static GPtrArray *
+copy_uids_array (GPtrArray *array)
+{
+ GPtrArray *res;
+ guint i, sz;
+
+ if (!array)
+ return NULL;
+
+ sz = array->len;
+ res = g_ptr_array_sized_new (sz);
+
+ for (i = 0; i < sz; i++) {
+ g_ptr_array_add (res, g_strdup (g_ptr_array_index (array, i)));
+ }
+
+ return res;
+}
+
+static GPtrArray *
decode_uids (FILE *file)
{
GPtrArray *uids;
@@ -413,20 +432,20 @@
{
GPtrArray *uids = va_arg (ap, GPtrArray *);
- entry->uids = uids;
+ entry->uids = copy_uids_array (uids);
break;
}
case CAMEL_IMAP_JOURNAL_ENTRY_APPEND:
{
char *uid = va_arg (ap, char *);
- entry->append_uid = uid;
+ entry->append_uid = g_strdup (uid);
break;
}
case CAMEL_IMAP_JOURNAL_ENTRY_TRANSFER:
{
CamelFolder *dest = va_arg (ap, CamelFolder *);
- entry->uids = va_arg (ap, GPtrArray *);
+ entry->uids = copy_uids_array (va_arg (ap, GPtrArray *));
entry->move = va_arg (ap, gboolean);
entry->dest_folder_name = g_strdup (dest->full_name);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]