[evolution-data-server] Fixes a crash when select fails due to cancellation of a job
- From: Chenthill Palanisamy <pchen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fixes a crash when select fails due to cancellation of a job
- Date: Wed, 10 Feb 2010 08:17:24 +0000 (UTC)
commit 3435531efc53609f379a00b0544d65c36ee47beb
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Wed Feb 10 13:49:30 2010 +0530
Fixes a crash when select fails due to cancellation of a job
camel/providers/imapx/camel-imapx-server.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index df9a39d..60babed 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1273,7 +1273,11 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
// TODO: we want to make sure the names match?
- printf("list: '%s' (%c)\n", linfo->name, linfo->separator);
+ if (job->u.list.flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)
+ printf("lsub: '%s' (%c)\n", linfo->name, linfo->separator);
+ else
+ printf("list: '%s' (%c)\n", linfo->name, linfo->separator);
+
if (job && g_hash_table_lookup(job->u.list.folders, linfo->name) == NULL) {
if (lsub)
linfo->flags |= CAMEL_FOLDER_SUBSCRIBED;
@@ -1835,14 +1839,18 @@ imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
QUEUE_LOCK(is);
cw = (CamelIMAPXCommand *)is->queue.head;
cn = cw->next;
- while (cn) {
- if (cw->select && strcmp(cw->select, is->select_pending->full_name) == 0) {
- camel_dlist_remove((CamelDListNode *)cw);
- camel_dlist_addtail(&failed, (CamelDListNode *)cw);
+
+ if (is->select_pending) {
+ while (cn) {
+ if (cw->select && strcmp(cw->select, is->select_pending->full_name) == 0) {
+ camel_dlist_remove((CamelDListNode *)cw);
+ camel_dlist_addtail(&failed, (CamelDListNode *)cw);
+ }
+ cw = cn;
+ cn = cn->next;
}
- cw = cn;
- cn = cn->next;
}
+
QUEUE_UNLOCK(is);
cw = (CamelIMAPXCommand *)failed.head;
@@ -2837,6 +2845,7 @@ imapx_command_list_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
camel_exception_xfer (ic->job->ex, ic->ex);
}
+ printf ("==== list or lsub completed ==== \n");
imapx_job_done (is, ic->job);
camel_imapx_command_free (ic);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]