1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

more comments

This commit is contained in:
Daniel Stenberg 2001-12-04 07:47:21 +00:00
parent 3ff2bfa0e4
commit d52c0b6f05

View File

@ -56,7 +56,7 @@ struct Curl_one_easy {
#define CURL_MULTI_HANDLE 0x000bab1e #define CURL_MULTI_HANDLE 0x000bab1e
#define GOOD_MULTI_HANDLE(x) ((x) && ((x)->type == CURL_MULTI_HANDLE)) #define GOOD_MULTI_HANDLE(x) ((x)&&(((struct Curl_multi *)x)->type == CURL_MULTI_HANDLE))
#define GOOD_EASY_HANDLE(x) (x) #define GOOD_EASY_HANDLE(x) (x)
/* This is the struct known as CURLM on the outside */ /* This is the struct known as CURLM on the outside */
@ -229,11 +229,14 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
switch(easy->state) { switch(easy->state) {
case CURLM_STATE_INIT: case CURLM_STATE_INIT:
/* init this transfer */ /* init this transfer. Hm, uh, I can't think of anything to init
easy->result = Curl_init(easy->easy_handle); right now, let's skip over to CONNECT at once!
easy->result = Curl_init(easy->easy_handle);
if(CURLE_OK == easy->result)
*/
/* after init, go CONNECT */ /* after init, go CONNECT */
if(CURLE_OK == easy->result) easy->state = CURLM_STATE_CONNECT;
easy->state = CURLM_STATE_CONNECT;
break; break;
case CURLM_STATE_CONNECT: case CURLM_STATE_CONNECT:
/* connect */ /* connect */
@ -252,6 +255,8 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
case CURLM_STATE_PERFORM: case CURLM_STATE_PERFORM:
/* read/write data if it is ready to do so */ /* read/write data if it is ready to do so */
easy->result = Curl_readwrite(easy->easy_handle, &done); easy->result = Curl_readwrite(easy->easy_handle, &done);
/* hm, when we follow redirects, we may need to go back to the CONNECT
state */
/* after the transfer is done, go DONE */ /* after the transfer is done, go DONE */
if(TRUE == done) if(TRUE == done)
easy->state = CURLM_STATE_DONE; easy->state = CURLM_STATE_DONE;