Commit 22ec4913 22ec4913c13137b497c6d6ee7f433d0b94e059cd by Sergey Poznyakoff

Bugfixes in imap client.

* libproto/imap/fetch.c (_fetch_fold): Fix parsing of BODY[].
(_mu_imap_parse_fetch_response): Fix return value.
1 parent 09be781f
...@@ -1052,6 +1052,12 @@ _fetch_fold (void *item, void *data) ...@@ -1052,6 +1052,12 @@ _fetch_fold (void *item, void *data)
1052 } 1052 }
1053 else if (strncmp (elt->v.string, "HEADER.FIELDS", 13) == 0) 1053 else if (strncmp (elt->v.string, "HEADER.FIELDS", 13) == 0)
1054 env->state = resp_body_hlist; 1054 env->state = resp_body_hlist;
1055 else if (strcmp (elt->v.string, "]") == 0)
1056 {
1057 env->section = NULL;
1058 env->state = resp_val;
1059 break;
1060 }
1055 else 1061 else
1056 env->state = resp_body_end; 1062 env->state = resp_body_end;
1057 env->section = elt->v.string; 1063 env->section = elt->v.string;
...@@ -1109,5 +1115,5 @@ _mu_imap_parse_fetch_response (mu_list_t input, mu_list_t *result_list) ...@@ -1109,5 +1115,5 @@ _mu_imap_parse_fetch_response (mu_list_t input, mu_list_t *result_list)
1109 else 1115 else
1110 *result_list = result; 1116 *result_list = result;
1111 mu_list_destroy (&env.hlist); 1117 mu_list_destroy (&env.hlist);
1112 return status; 1118 return env.status;
1113 } 1119 }
......