Loading lib/imap.c +6 −30 Original line number Diff line number Diff line Loading @@ -1020,8 +1020,9 @@ static CURLcode imap_state_login_resp(struct connectdata *conn, return result; } /* For LIST responses */ static CURLcode imap_state_list_resp(struct connectdata *conn, int imapcode, /* For LIST and SEARCH responses */ static CURLcode imap_state_listsearch_resp(struct connectdata *conn, int imapcode, imapstate instate) { CURLcode result = CURLE_OK; Loading Loading @@ -1249,31 +1250,6 @@ static CURLcode imap_state_append_final_resp(struct connectdata *conn, return result; } /* For SEARCH responses */ static CURLcode imap_state_search_resp(struct connectdata *conn, int imapcode, imapstate instate) { CURLcode result = CURLE_OK; char *line = conn->data->state.buffer; size_t len = strlen(line); (void)instate; /* No use for this yet */ if(imapcode == '*') { /* Temporarily add the LF character back and send as body to the client */ line[len] = '\n'; result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1); line[len] = '\0'; } else if(imapcode != 'O') result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */ else /* End of DO phase */ state(conn, IMAP_STOP); return result; } static CURLcode imap_statemach_act(struct connectdata *conn) { CURLcode result = CURLE_OK; Loading Loading @@ -1327,7 +1303,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn) break; case IMAP_LIST: result = imap_state_list_resp(conn, imapcode, imapc->state); result = imap_state_listsearch_resp(conn, imapcode, imapc->state); break; case IMAP_SELECT: Loading @@ -1351,7 +1327,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn) break; case IMAP_SEARCH: result = imap_state_search_resp(conn, imapcode, imapc->state); result = imap_state_listsearch_resp(conn, imapcode, imapc->state); break; case IMAP_LOGOUT: Loading Loading
lib/imap.c +6 −30 Original line number Diff line number Diff line Loading @@ -1020,8 +1020,9 @@ static CURLcode imap_state_login_resp(struct connectdata *conn, return result; } /* For LIST responses */ static CURLcode imap_state_list_resp(struct connectdata *conn, int imapcode, /* For LIST and SEARCH responses */ static CURLcode imap_state_listsearch_resp(struct connectdata *conn, int imapcode, imapstate instate) { CURLcode result = CURLE_OK; Loading Loading @@ -1249,31 +1250,6 @@ static CURLcode imap_state_append_final_resp(struct connectdata *conn, return result; } /* For SEARCH responses */ static CURLcode imap_state_search_resp(struct connectdata *conn, int imapcode, imapstate instate) { CURLcode result = CURLE_OK; char *line = conn->data->state.buffer; size_t len = strlen(line); (void)instate; /* No use for this yet */ if(imapcode == '*') { /* Temporarily add the LF character back and send as body to the client */ line[len] = '\n'; result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1); line[len] = '\0'; } else if(imapcode != 'O') result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */ else /* End of DO phase */ state(conn, IMAP_STOP); return result; } static CURLcode imap_statemach_act(struct connectdata *conn) { CURLcode result = CURLE_OK; Loading Loading @@ -1327,7 +1303,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn) break; case IMAP_LIST: result = imap_state_list_resp(conn, imapcode, imapc->state); result = imap_state_listsearch_resp(conn, imapcode, imapc->state); break; case IMAP_SELECT: Loading @@ -1351,7 +1327,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn) break; case IMAP_SEARCH: result = imap_state_search_resp(conn, imapcode, imapc->state); result = imap_state_listsearch_resp(conn, imapcode, imapc->state); break; case IMAP_LOGOUT: Loading