aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-11 02:33:22 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-11 02:33:22 +0800
commit6b6972e26e7c956a392bbec6c4faaf33555df990 (patch)
tree26b52e8886ba6c09dbb67e59b7b4af1f8c0a05cb /camel/providers
parent2b9842e7ce9804bc505676fc8c463236b33d5e54 (diff)
downloadgsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.tar
gsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.tar.gz
gsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.tar.bz2
gsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.tar.lz
gsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.tar.xz
gsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.tar.zst
gsoc2013-evolution-6b6972e26e7c956a392bbec6c4faaf33555df990.zip
Don't g_strdup() the uid into the trigger_event call.
2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Don't g_strdup() the uid into the trigger_event call. svn path=/trunk/; revision=11891
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 451d0363e6..b5fba64117 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -420,17 +420,17 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
CamelImapMessageInfo *iinfo;
GArray *removed;
gboolean ok;
-
+
CAMEL_IMAP_STORE_ASSERT_LOCKED (store, command_lock);
imap_folder->need_rescan = FALSE;
-
+
summary_len = camel_folder_summary_count (folder->summary);
if (summary_len == 0) {
if (exists)
camel_imap_folder_changed (folder, exists, NULL, ex);
return;
}
-
+
/* Check UIDs and flags of all messages we already know of. */
camel_operation_start (NULL, _("Scanning for changed messages"));
info = camel_folder_summary_index (folder->summary, summary_len - 1);
@@ -442,34 +442,34 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
camel_operation_end (NULL);
return;
}
-
+
new = g_malloc0 (summary_len * sizeof (*new));
summary_got = 0;
while ((type = camel_imap_command_response (store, &resp, ex)) == CAMEL_IMAP_RESPONSE_UNTAGGED) {
GData *data;
char *uid;
guint32 flags;
-
+
data = parse_fetch_response (imap_folder, resp);
g_free (resp);
if (!data)
continue;
-
+
seq = GPOINTER_TO_INT (g_datalist_get_data (&data, "SEQUENCE"));
uid = g_datalist_get_data (&data, "UID");
flags = GPOINTER_TO_UINT (g_datalist_get_data (&data, "FLAGS"));
-
+
if (!uid || !seq || seq >= summary_len) {
g_datalist_clear (&data);
continue;
}
-
+
camel_operation_progress (NULL, ++summary_got * 100 / summary_len);
new[seq - 1].uid = g_strdup (uid);
new[seq - 1].flags = flags;
g_datalist_clear (&data);
}
-
+
camel_operation_end (NULL);
if (type == CAMEL_IMAP_RESPONSE_ERROR) {
for (i = 0; i < summary_len && new[i].uid; i++)
@@ -479,7 +479,7 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
}
/* Free the final tagged response */
g_free (resp);
-
+
/* If we find a UID in the summary that doesn't correspond to
* the UID in the folder, then either: (a) it's a real UID,
* but the message was deleted on the server, or (b) it's a
@@ -491,7 +491,7 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
for (i = 0; i < summary_len && new[i].uid; i++) {
info = camel_folder_summary_index (folder->summary, i);
iinfo = (CamelImapMessageInfo *)info;
-
+
if (strcmp (camel_message_info_uid (info), new[i].uid) != 0) {
camel_folder_summary_info_free(folder->summary, info);
seq = i + 1;
@@ -500,22 +500,22 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
summary_len--;
continue;
}
-
+
/* Update summary flags */
if (new[i].flags != iinfo->server_flags) {
guint32 server_set, server_cleared;
-
+
server_set = new[i].flags & ~iinfo->server_flags;
server_cleared = iinfo->server_flags & ~new[i].flags;
-
+
info->flags = (info->flags | server_set) & ~server_cleared;
iinfo->server_flags = new[i].flags;
-
+
camel_object_trigger_event (CAMEL_OBJECT (folder),
"message_changed",
- g_strdup (new[i].uid));
+ new[i].uid);
}
-
+
camel_folder_summary_info_free (folder->summary, info);
g_free (new[i].uid);
}