[evolution-kolab: 12/16] updated IMAPX files as of EDS commit 80680df918074e0665478d728901182327b5a742
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab: 12/16] updated IMAPX files as of EDS commit 80680df918074e0665478d728901182327b5a742
- Date: Thu, 8 Mar 2012 11:11:33 +0000 (UTC)
commit ebe7b39c81abb215ef7a32d19c4951c71b75f5e3
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Mar 8 11:36:58 2012 +0100
updated IMAPX files as of EDS commit 80680df918074e0665478d728901182327b5a742
* updated the local IMAPX code from upstream
* now at EDS commit
80680df918074e0665478d728901182327b5a742
src/camel/providers/imapx/camel-imapx-command.c | 4 ++--
src/camel/providers/imapx/camel-imapx-folder.c | 20 ++++++++++++++++++++
src/camel/providers/imapx/camel-imapx-server.c | 8 +++++++-
3 files changed, 29 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-command.c b/src/camel/providers/imapx/camel-imapx-command.c
index f648a03..e9d1298 100644
--- a/src/camel/providers/imapx/camel-imapx-command.c
+++ b/src/camel/providers/imapx/camel-imapx-command.c
@@ -479,9 +479,9 @@ camel_imapx_command_close (CamelIMAPXCommand *ic)
buffer = ((CamelIMAPXRealCommand *) ic)->buffer;
if (buffer->len > 5 && g_ascii_strncasecmp (buffer->str, "LOGIN", 5) == 0) {
- c(ic->is->tagprefix, "completing command buffer is [%d] 'LOGIN...'\n", buffer->len);
+ c(ic->is->tagprefix, "completing command buffer is [%d] 'LOGIN...'\n", (gint) buffer->len);
} else {
- c(ic->is->tagprefix, "completing command buffer is [%d] '%.*s'\n", buffer->len, buffer->len, buffer->str);
+ c(ic->is->tagprefix, "completing command buffer is [%d] '%.*s'\n", (gint) buffer->len, (gint) buffer->len, buffer->str);
}
if (buffer->len > 0)
camel_imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_SIMPLE, NULL);
diff --git a/src/camel/providers/imapx/camel-imapx-folder.c b/src/camel/providers/imapx/camel-imapx-folder.c
index 7122f7e..f73fe70 100644
--- a/src/camel/providers/imapx/camel-imapx-folder.c
+++ b/src/camel/providers/imapx/camel-imapx-folder.c
@@ -711,6 +711,25 @@ imapx_transfer_messages_to_sync (CamelFolder *source,
}
static void
+imapx_rename (CamelFolder *folder,
+ const gchar *new_name)
+{
+ CamelStore *parent_store;
+
+ parent_store = camel_folder_get_parent_store (folder);
+
+ camel_store_summary_disconnect_folder_summary (
+ (CamelStoreSummary *) ((CamelIMAPXStore *) parent_store)->summary,
+ folder->summary);
+
+ CAMEL_FOLDER_CLASS (camel_imapx_folder_parent_class)->rename (folder, new_name);
+
+ camel_store_summary_connect_folder_summary (
+ (CamelStoreSummary *) ((CamelIMAPXStore *) parent_store)->summary,
+ camel_folder_get_full_name (folder), folder->summary);
+}
+
+static void
camel_imapx_folder_class_init (CamelIMAPXFolderClass *class)
{
GObjectClass *object_class;
@@ -723,6 +742,7 @@ camel_imapx_folder_class_init (CamelIMAPXFolderClass *class)
object_class->finalize = imapx_folder_finalize;
folder_class = CAMEL_FOLDER_CLASS (class);
+ folder_class->rename = imapx_rename;
folder_class->search_by_expression = imapx_search_by_expression;
folder_class->search_by_uids = imapx_search_by_uids;
folder_class->count_by_expression = imapx_count_by_expression;
diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c
index 51d1975..eb50101 100644
--- a/src/camel/providers/imapx/camel-imapx-server.c
+++ b/src/camel/providers/imapx/camel-imapx-server.c
@@ -4192,7 +4192,7 @@ imapx_job_fetch_messages_start (CamelIMAPXJob *job,
guint64 uidl;
start_uid = imapx_get_uid_from_index (folder->summary, 0);
uidl = strtoull (start_uid, NULL, 10);
- end_uid = g_strdup_printf("%lld", (((int)uidl)-fetch_limit > 0) ? (uidl-fetch_limit) : 1);
+ end_uid = g_strdup_printf ("%" G_GINT64_MODIFIER "d", (((int)uidl)-fetch_limit > 0) ? (uidl-fetch_limit) : 1);
camel_operation_push_message (
job->cancellable,
@@ -5094,6 +5094,12 @@ cancel_all_jobs (CamelIMAPXServer *is,
for (link = head; link != NULL; link = g_list_next (link)) {
CamelIMAPXCommand *ic = link->data;
+ /* Sanity check the CamelIMAPXCommand before proceeding.
+ * XXX We are actually getting reports of crashes here...
+ * not sure how this is happening but it's happening. */
+ if (ic == NULL || ic->job == NULL)
+ continue;
+
if (ic->job->error == NULL)
ic->job->error = g_error_copy (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]