[evolution-data-server] Don't bother checking for is->cinfo being NULL. It can never happen now.



commit 7e0e64e76a0771fd6681d21fc63ce97251410e88
Author: David Woodhouse <David Woodhouse intel com>
Date:   Thu Jun 24 11:12:02 2010 +0100

    Don't bother checking for is->cinfo being NULL. It can never happen now.
    
    Famous last words, I know...

 camel/providers/imapx/camel-imapx-server.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index f79b333..589b9ea 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1439,10 +1439,11 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
 			break;
 		case IMAPX_CAPABILITY:
 			if (sinfo->u.cinfo) {
-				if (imap->cinfo)
-					imapx_free_capability(imap->cinfo);
+				struct _capability_info *cinfo = imap->cinfo;
 				imap->cinfo = sinfo->u.cinfo;
 				sinfo->u.cinfo = NULL;
+				if (cinfo)
+					imapx_free_capability(cinfo);
 				c(printf("got capability flags %08x\n", imap->cinfo->capa));
 			}
 			break;
@@ -2015,7 +2016,7 @@ imapx_in_idle (CamelIMAPXServer *is)
 static gboolean
 imapx_idle_supported (CamelIMAPXServer *is)
 {
-	return (is->cinfo && is->cinfo->capa & IMAPX_CAPABILITY_IDLE && is->use_idle);
+	return (is->cinfo->capa & IMAPX_CAPABILITY_IDLE && is->use_idle);
 }
 
 // end IDLE
@@ -2506,7 +2507,7 @@ imapx_reconnect (CamelIMAPXServer *is, CamelException *ex)
 			goto preauthed;
 
 		if (!authtype && service->url->authmech) {
-			if (is->cinfo && !g_hash_table_lookup (is->cinfo->auth_types, service->url->authmech)) {
+			if (!g_hash_table_lookup (is->cinfo->auth_types, service->url->authmech)) {
 				camel_exception_setv (
 					ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
 					_("IMAP server %s does not support requested "



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