aboutsummaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-01-17 12:59:23 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-01-17 19:40:35 +0100
commitc43127414d89ccb9ef6517081f68986d991bcfb3 (patch)
treef6a639061f5e199089a923b052904aa24901243c /lib/pop3.c
parent9fd88abb7032346e88636165e688232e36f5c336 (diff)
always-multi: always use non-blocking internals
Remove internal separated behavior of the easy vs multi intercace. curl_easy_perform() is now using the multi interface itself. Several minor multi interface quirks and bugs have been fixed in the process. Much help with debugging this has been provided by: Yang Tse
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index e8fd9c52c..b5ea7c23f 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -570,17 +570,8 @@ static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
result = pop3_state_capa(conn);
}
else {
- if(data->state.used_interface == Curl_if_multi) {
- state(conn, POP3_UPGRADETLS);
- result = pop3_state_upgrade_tls(conn);
- }
- else {
- result = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(CURLE_OK == result) {
- pop3_to_pop3s(conn);
- result = pop3_state_capa(conn);
- }
- }
+ state(conn, POP3_UPGRADETLS);
+ result = pop3_state_upgrade_tls(conn);
}
return result;
@@ -1301,7 +1292,6 @@ static CURLcode pop3_connect(struct connectdata *conn, bool *done)
{
CURLcode result;
struct pop3_conn *pop3c = &conn->proto.pop3c;
- struct SessionHandle *data = conn->data;
struct pingpong *pp = &pop3c->pp;
*done = FALSE; /* default to not done yet */
@@ -1336,13 +1326,7 @@ static CURLcode pop3_connect(struct connectdata *conn, bool *done)
/* Start off waiting for the server greeting response */
state(conn, POP3_SERVERGREET);
- if(data->state.used_interface == Curl_if_multi)
- result = pop3_multi_statemach(conn, done);
- else {
- result = pop3_easy_statemach(conn);
- if(!result)
- *done = TRUE;
- }
+ result = pop3_multi_statemach(conn, done);
return result;
}
@@ -1418,12 +1402,8 @@ static CURLcode pop3_perform(struct connectdata *conn, bool *connected,
return result;
/* Run the state-machine */
- if(conn->data->state.used_interface == Curl_if_multi)
- result = pop3_multi_statemach(conn, dophase_done);
- else {
- result = pop3_easy_statemach(conn);
- *dophase_done = TRUE; /* with the easy interface we are done here */
- }
+ result = pop3_multi_statemach(conn, dophase_done);
+
*connected = conn->bits.tcpconnect[FIRSTSOCKET];
if(*dophase_done)