diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-24 11:12:02 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-07-31 16:08:24 +0200 |
commit | 1525fa864c9dd6d3c88e3a40e135740d0b1bd23f (patch) | |
tree | 3ce8c7900930fe1cdfa7ca6760326286f9452676 | |
parent | 51920efa6ea9a3c82a22827088c618207cd90e02 (diff) | |
download | evolution-data-server-1525fa864c9dd6d3c88e3a40e135740d0b1bd23f.tar.gz |
Don't bother checking for is->cinfo being NULL. It can never happen now.
Famous last words, I know...
(cherry picked from commit 7e0e64e76a0771fd6681d21fc63ce97251410e88)
(With a couple more in camel-imap-server.c which I had slipped in during
merges to gnome-2-30 branch)
-rw-r--r-- | camel/providers/imapx/camel-imapx-server.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c index fd87c67d9..02887abf9 100644 --- a/camel/providers/imapx/camel-imapx-server.c +++ b/camel/providers/imapx/camel-imapx-server.c @@ -502,7 +502,7 @@ imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, g } if (type & CAMEL_IMAPX_COMMAND_LITERAL_PLUS) { - if (ic->is->cinfo && ic->is->cinfo->capa & IMAPX_CAPABILITY_LITERALPLUS) { + if (ic->is->cinfo->capa & IMAPX_CAPABILITY_LITERALPLUS) { camel_stream_printf((CamelStream *)ic->mem, "{%u+}", ob_size); } else { type &= ~CAMEL_IMAPX_COMMAND_LITERAL_PLUS; @@ -1598,10 +1598,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; @@ -2219,7 +2220,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 @@ -2712,7 +2713,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 " @@ -3638,7 +3639,7 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is, CamelIMAPXJob *job) } } } else { - if (is->cinfo && is->cinfo->capa & IMAPX_CAPABILITY_CONDSTORE) + if (is->cinfo->capa & IMAPX_CAPABILITY_CONDSTORE) ic = camel_imapx_command_new (is, "STATUS", NULL, "STATUS %f (MESSAGES UNSEEN UIDNEXT HIGHESTMODSEQ)", folder); else ic = camel_imapx_command_new (is, "STATUS", NULL, "STATUS %f (MESSAGES UNSEEN UIDNEXT)", folder); |