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:
Steve Holme
2013-02-12 18:08:48 +00:00
parent 586f5d3614
commit b56c9eb48e
6 changed files with 15 additions and 20 deletions

View File

@@ -220,11 +220,9 @@ static void pop3_to_pop3s(struct connectdata *conn)
given string, but also detects the APOP timestamp from the server greeting
as well as the supported authentication types and allowed SASL mechanisms
from the CAPA response. */
static int pop3_endofresp(struct pingpong *pp, int *resp)
static bool pop3_endofresp(struct connectdata *conn, char *line, size_t len,
int *resp)
{
char *line = pp->linestart_resp;
size_t len = strlen(pp->linestart_resp);
struct connectdata *conn = pp->conn;
struct pop3_conn *pop3c = &conn->proto.pop3c;
size_t wordlen;
size_t i;