diff options
author | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-11 07:15:39 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-11 07:15:39 +0800 |
commit | 03ed3fbb05979752f991d4181a16ff720ecfb791 (patch) | |
tree | 9fc5772d4caa4659ec3bf75f1128b8d70c3e8a5f /camel/providers | |
parent | cb21428ef8f23891a4870886ed1f9dfec3969a61 (diff) | |
download | gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.tar gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.tar.gz gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.tar.bz2 gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.tar.lz gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.tar.xz gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.tar.zst gsoc2013-evolution-03ed3fbb05979752f991d4181a16ff720ecfb791.zip |
some code cleanup
svn path=/trunk/; revision=26295
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/imap4/camel-imap4-utils.c | 9 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-utils.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/camel/providers/imap4/camel-imap4-utils.c b/camel/providers/imap4/camel-imap4-utils.c index 2efac2ff42..74a5bca15e 100644 --- a/camel/providers/imap4/camel-imap4-utils.c +++ b/camel/providers/imap4/camel-imap4-utils.c @@ -325,7 +325,6 @@ static struct { { "UIDNEXT", CAMEL_IMAP4_STATUS_UIDNEXT }, { "UIDVALIDITY", CAMEL_IMAP4_STATUS_UIDVALIDITY }, { "UNSEEN", CAMEL_IMAP4_STATUS_UNSEEN }, - { NULL, CAMEL_IMAP4_STATUS_UNKNOWN }, }; @@ -355,6 +354,7 @@ camel_imap4_untagged_status (CamelIMAP4Engine *engine, CamelIMAP4Command *ic, gu char *mailbox; size_t len; int type; + int i; if (camel_imap4_engine_next_token (engine, token, ex) == -1) return -1; @@ -399,9 +399,12 @@ camel_imap4_untagged_status (CamelIMAP4Engine *engine, CamelIMAP4Command *ic, gu while (token->token == CAMEL_IMAP4_TOKEN_ATOM) { /* parse the status messages list */ - for (type = 0; type < G_N_ELEMENTS (imap4_status); type++) { - if (!g_ascii_strcasecmp (imap4_status[type].name, token->v.atom)) + type = CAMEL_IMAP4_STATUS_UNKNOWN; + for (i = 0; i < G_N_ELEMENTS (imap4_status); i++) { + if (!g_ascii_strcasecmp (imap4_status[i].name, token->v.atom)) { + type = imap4_status[i].type; break; + } } if (type == CAMEL_IMAP4_STATUS_UNKNOWN) diff --git a/camel/providers/imap4/camel-imap4-utils.h b/camel/providers/imap4/camel-imap4-utils.h index cfaf6a4dc4..31e2b0a67b 100644 --- a/camel/providers/imap4/camel-imap4-utils.h +++ b/camel/providers/imap4/camel-imap4-utils.h @@ -62,12 +62,12 @@ int camel_imap4_untagged_list (struct _CamelIMAP4Engine *engine, struct _CamelIM enum { + CAMEL_IMAP4_STATUS_UNKNOWN, CAMEL_IMAP4_STATUS_MESSAGES, CAMEL_IMAP4_STATUS_RECENT, CAMEL_IMAP4_STATUS_UIDNEXT, CAMEL_IMAP4_STATUS_UIDVALIDITY, CAMEL_IMAP4_STATUS_UNSEEN, - CAMEL_IMAP4_STATUS_UNKNOWN, }; typedef struct _camel_imap4_status_attr { |