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
Showing
2 changed files
with
3 additions
and
3 deletions
... | @@ -875,10 +875,10 @@ _imap_message_unseen (mu_mailbox_t mbox, size_t *pn) | ... | @@ -875,10 +875,10 @@ _imap_message_unseen (mu_mailbox_t mbox, size_t *pn) |
875 | rc = mu_msgset_get_list (msgset, &list); | 875 | rc = mu_msgset_get_list (msgset, &list); |
876 | if (rc == 0) | 876 | if (rc == 0) |
877 | { | 877 | { |
878 | struct mu_msgrange r; | 878 | struct mu_msgrange *r; |
879 | rc = mu_list_head (list, (void **) &r); | 879 | rc = mu_list_head (list, (void **) &r); |
880 | if (rc == 0) | 880 | if (rc == 0) |
881 | *pn = r.msg_beg; | 881 | *pn = r->msg_beg; |
882 | } | 882 | } |
883 | mu_msgset_free (msgset); | 883 | mu_msgset_free (msgset); |
884 | return rc; | 884 | return rc; | ... | ... |
... | @@ -72,7 +72,7 @@ parse_response_code (mu_imap_t imap, mu_list_t resp) | ... | @@ -72,7 +72,7 @@ parse_response_code (mu_imap_t imap, mu_list_t resp) |
72 | if (mu_kwd_xlat_name (mu_imap_response_codes, arg->v.string, &rcode)) | 72 | if (mu_kwd_xlat_name (mu_imap_response_codes, arg->v.string, &rcode)) |
73 | return -1; | 73 | return -1; |
74 | 74 | ||
75 | arg = _mu_imap_list_at (resp, 3); | 75 | arg = _mu_imap_list_at (resp, 4); |
76 | if (!arg || !_mu_imap_list_element_is_string (arg, "]")) | 76 | if (!arg || !_mu_imap_list_element_is_string (arg, "]")) |
77 | return -1; | 77 | return -1; |
78 | } | 78 | } | ... | ... |
-
Please register or sign in to post a comment