Clean-up state changes in imap client. Fix error handling in it and in pop3.
* include/mailutils/imap.h (mu_imap_state): Rename to struct mu_imap_session_state, prefix all values with MU_IMAP_STATE_. All uses updated. * include/mailutils/sys/imap.h (mu_imap_client_state): Prefix all values with MU_IMAP_CLIENT. Rename MU_IMAP_NO_STATE to MU_IMAP_READY. All uses updated. (_mu_imap)<state>: Rename to client_state, fix data type. (imap_state): Rename to imap_state. All uses updated. (MU_IMAP_CHECK_EAGAIN): Reset state to MU_IMAP_CLIENT_READY if MU_ERR_REPLY or MU_ERR_BADREPLY is reported. * include/mailutils/sys/pop3.h (MU_POP3_CHECK_EAGAIN): Reset state to MU_POP3_NO_STATE, if MU_ERR_REPLY or MU_ERR_BADREPLY is reported. * libproto/imap/fetch.c (_date_mapper): Avoid overwriting resp->type. * libproto/imap/select.c (_mu_imap_collect_flags): Initialize *res prior to collecting flags into it. * mu/imap.c: Install a FETCH callback.
Showing
20 changed files
with
314 additions
and
169 deletions
-
Please register or sign in to post a comment