diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-05 17:04:39 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-05 17:04:39 +0000 |
commit | 108cb14d1f01deb5e5704c70c0feb8e2fd8d2175 (patch) | |
tree | 0e0f8893ce1b7cab404e0ef8e8024a6acfb8ed28 | |
parent | b98308b524fd5202e76077de5b1bd3202671acab (diff) |
Make SessionHandle keep record if it is used with the multi interface or
the easy interface, it CANNOT be used by a mixture.
-rw-r--r-- | lib/multi.c | 3 | ||||
-rw-r--r-- | lib/transfer.c | 2 | ||||
-rw-r--r-- | lib/urldata.h | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index d6ede8235..2e6a408b4 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -263,10 +263,13 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) case CURLM_STATE_INIT: /* init this transfer. */ easy->result=Curl_pretransfer(easy->easy_handle); + if(CURLE_OK == easy->result) { /* after init, go CONNECT */ easy->state = CURLM_STATE_CONNECT; result = CURLM_CALL_MULTI_PERFORM; + + easy->easy_handle->state.used_interface = Curl_if_multi; } break; case CURLM_STATE_CONNECT: diff --git a/lib/transfer.c b/lib/transfer.c index f266a4a3b..ae9d621c8 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1156,6 +1156,8 @@ CURLcode Curl_perform(struct SessionHandle *data) struct connectdata *conn=NULL; char *newurl = NULL; /* possibly a new URL to follow to! */ + data->state.used_interface = Curl_if_easy; + res = Curl_pretransfer(data); if(res) return res; diff --git a/lib/urldata.h b/lib/urldata.h index cb0e3dec9..57ac15529 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -488,6 +488,12 @@ typedef enum { #define MAX_CURL_PASSWORD_LENGTH 256 struct UrlState { + enum { + Curl_if_none, + Curl_if_easy, + Curl_if_multi + } used_interface; + /* buffers to store authentication data in, as parsed from input options */ char user[MAX_CURL_USER_LENGTH]; char passwd[MAX_CURL_PASSWORD_LENGTH]; |