From e79535bc5e8e25df8415b6b23671cbd8bd3c83a5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 5 Aug 2013 10:32:08 +0200 Subject: SessionHandle: the protocol specific pointer is now a void * All protocol handler structs are now opaque (void *) in the SessionHandle struct and moved in the request-specific sub-struct 'SingleRequest'. The intension is to keep the protocol specific knowledge in their own dedicated source files [protocol].c etc. There's some "leakage" where this policy is violated, to be addressed at a later point in time. --- lib/pop3.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/pop3.c') diff --git a/lib/pop3.c b/lib/pop3.c index 813414ebc..5b49b1af7 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -673,7 +673,7 @@ static CURLcode pop3_perform_command(struct connectdata *conn) { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; - struct POP3 *pop3 = data->state.proto.pop3; + struct POP3 *pop3 = data->req.protop; const char *command = NULL; /* Calculate the default command */ @@ -1203,7 +1203,7 @@ static CURLcode pop3_state_command_resp(struct connectdata *conn, { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; - struct POP3 *pop3 = data->state.proto.pop3; + struct POP3 *pop3 = data->req.protop; struct pop3_conn *pop3c = &conn->proto.pop3c; struct pingpong *pp = &pop3c->pp; @@ -1397,7 +1397,7 @@ static CURLcode pop3_init(struct connectdata *conn) struct SessionHandle *data = conn->data; struct POP3 *pop3; - pop3 = data->state.proto.pop3 = calloc(sizeof(struct POP3), 1); + pop3 = data->req.protop = calloc(sizeof(struct POP3), 1); if(!pop3) result = CURLE_OUT_OF_MEMORY; @@ -1472,7 +1472,7 @@ static CURLcode pop3_done(struct connectdata *conn, CURLcode status, { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; - struct POP3 *pop3 = data->state.proto.pop3; + struct POP3 *pop3 = data->req.protop; (void)premature; @@ -1515,7 +1515,7 @@ static CURLcode pop3_perform(struct connectdata *conn, bool *connected, if(conn->data->set.opt_no_body) { /* Requested no body means no transfer */ - struct POP3 *pop3 = conn->data->state.proto.pop3; + struct POP3 *pop3 = conn->data->req.protop; pop3->transfer = FTPTRANSFER_INFO; } @@ -1774,7 +1774,7 @@ static CURLcode pop3_parse_url_path(struct connectdata *conn) { /* The POP3 struct is already initialised in pop3_connect() */ struct SessionHandle *data = conn->data; - struct POP3 *pop3 = data->state.proto.pop3; + struct POP3 *pop3 = data->req.protop; const char *path = data->state.path; /* URL decode the path for the message ID */ @@ -1791,7 +1791,7 @@ static CURLcode pop3_parse_custom_request(struct connectdata *conn) { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; - struct POP3 *pop3 = data->state.proto.pop3; + struct POP3 *pop3 = data->req.protop; const char *custom = data->set.str[STRING_CUSTOMREQUEST]; /* URL decode the custom request */ -- cgit v1.2.3