[evolution-data-server] CamelIMAPXServer: Prevent failed commands from starting new ones.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelIMAPXServer: Prevent failed commands from starting new ones.
- Date: Sun, 25 Mar 2012 22:45:36 +0000 (UTC)
commit a3fb753490bf252ff1742459abd1b9ed248e2b56
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Mar 23 15:15:27 2012 -0400
CamelIMAPXServer: Prevent failed commands from starting new ones.
camel/providers/imapx/camel-imapx-server.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 4b0ec46..35e4384 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -546,6 +546,14 @@ err:
camel_imapx_command_queue_remove (is->active, ic);
+ /* HACK: Since we're failing, make sure the command has a status
+ * structure and the result code indicates failure, so the
+ * ic->complete() callback does not start a new command. */
+ if (ic->status == NULL)
+ ic->status = g_malloc0 (sizeof (struct _status_info));
+ if (ic->status->result == IMAPX_OK)
+ ic->status->result = IMAPX_UNKNOWN;
+
/* Send a NULL GError since we've already set a
* GError to get here, and we're not interested
* in individual command errors. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]