Commit 48bfe14e 48bfe14edfa7612b2aea89f408ffa7952e88940a by Sergey Poznyakoff

Bugfixes in imap client code

* libproto/imap/mbox.c (_imap_message_unseen): Fix type of
pointer returned by mu_list_head
* libproto/imap/resproc.c (parse_response_code): Fix parser
1 parent 4323d352
......@@ -875,10 +875,10 @@ _imap_message_unseen (mu_mailbox_t mbox, size_t *pn)
rc = mu_msgset_get_list (msgset, &list);
if (rc == 0)
{
struct mu_msgrange r;
struct mu_msgrange *r;
rc = mu_list_head (list, (void **) &r);
if (rc == 0)
*pn = r.msg_beg;
*pn = r->msg_beg;
}
mu_msgset_free (msgset);
return rc;
......
......@@ -72,7 +72,7 @@ parse_response_code (mu_imap_t imap, mu_list_t resp)
if (mu_kwd_xlat_name (mu_imap_response_codes, arg->v.string, &rcode))
return -1;
arg = _mu_imap_list_at (resp, 3);
arg = _mu_imap_list_at (resp, 4);
if (!arg || !_mu_imap_list_element_is_string (arg, "]"))
return -1;
}
......