pingpong: Optimised the endofresp() function
Reworked the pp->endofresp() function so that the conndata, line and line length are passed down to it just as with Curl_client_write() rather than each implementation of the function having to query these values. Additionally changed the int return type to bool as this is more representative of the function's usage.
This commit is contained in:
@@ -327,11 +327,10 @@ static char* imap_atom(const char* str)
|
||||
/* Function that checks for an ending IMAP status code at the start of the
|
||||
given string but also detects various capabilities from the CAPABILITY
|
||||
response including the supported authentication mechanisms. */
|
||||
static int imap_endofresp(struct pingpong *pp, int *resp)
|
||||
static bool imap_endofresp(struct connectdata *conn, char *line, size_t len,
|
||||
int *resp)
|
||||
{
|
||||
char *line = pp->linestart_resp;
|
||||
size_t len = pp->nread_resp;
|
||||
struct imap_conn *imapc = &pp->conn->proto.imapc;
|
||||
struct imap_conn *imapc = &conn->proto.imapc;
|
||||
const char *id = imapc->resptag;
|
||||
size_t id_len = strlen(id);
|
||||
size_t wordlen;
|
||||
|
Reference in New Issue
Block a user