[evolution-data-server/gnome-2-30] Handle BYE response (cherry picked from commit 0b52c6b9ef0ed9a27942bc7cf6493886a9db0967)



commit 7542842bcaf47323d519a1ec49b818315baf2dcd
Author: David Woodhouse <David Woodhouse intel com>
Date:   Fri Jun 25 12:25:38 2010 +0100

    Handle BYE response
    (cherry picked from commit 0b52c6b9ef0ed9a27942bc7cf6493886a9db0967)

 camel/providers/imapx/camel-imapx-server.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index a17c6d1..7b1c815 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1522,12 +1522,22 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
 		}
 		break;
 	}
+	case IMAPX_BYE: {
+		guchar *token;
+
+		camel_imapx_stream_text (imap->stream, &token, ex);
+		if (!camel_exception_is_set(ex)) {
+			c(printf("BYE: %s\n", token));
+			camel_exception_setv(ex, 1, "IMAP server said BYE: %s", token);
+		}
+		break;
+	}
 	case IMAPX_PREAUTH:
 		c(printf("preauthenticated\n"));
 		if (imap->state < IMAPX_AUTHENTICATED)
 			imap->state = IMAPX_AUTHENTICATED;
 		/* fall through... */
-	case IMAPX_BYE: case IMAPX_OK: case IMAPX_NO: case IMAPX_BAD:
+	case IMAPX_OK: case IMAPX_NO: case IMAPX_BAD:
 		/* TODO: validate which ones of these can happen as unsolicited responses */
 		/* TODO: handle bye/preauth differently */
 		camel_imapx_stream_ungettoken(imap->stream, tok, token, len);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]