diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-02-27 23:57:23 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-03-03 23:25:23 +0100 |
commit | 9c188e771c9d5ecbdb04cbc9f3936bb9f52f78c9 (patch) | |
tree | 8e80174942206e34a4d3b2d478847a537b5ecf3c /lib/multi.c | |
parent | c84c0f9aa3bb0068bd6cbf6fce77bacccececa75 (diff) | |
download | curl-9c188e771c9d5ecbdb04cbc9f3936bb9f52f78c9.tar.gz |
ftp: allocate the wildcard struct on demand
The feature is rarely used so this frees up data for the vast majority
of easy handles that don't use it.
Rename "protdata" to "ftpwc" since it is always an FTP wildcard struct
pointer. Made the state struct field an unsigned char to save space.
Closes #10639
Diffstat (limited to 'lib/multi.c')
-rw-r--r-- | lib/multi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/multi.c b/lib/multi.c index f020a0b64..2f0d020af 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -2192,7 +2192,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, #ifndef CURL_DISABLE_FTP /* some steps needed for wildcard matching */ if(data->state.wildcardmatch) { - struct WildcardData *wc = &data->wildcard; + struct WildcardData *wc = data->wildcard; if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) { /* skip some states if it is important */ multi_done(data, CURLE_OK, FALSE); @@ -2344,7 +2344,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, #ifndef CURL_DISABLE_FTP if(data->state.wildcardmatch && ((data->conn->handler->flags & PROTOPT_WILDCARD) == 0)) { - data->wildcard.state = CURLWC_DONE; + data->wildcard->state = CURLWC_DONE; } #endif multistate(data, MSTATE_DONE); @@ -2574,7 +2574,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, #ifndef CURL_DISABLE_FTP if(data->state.wildcardmatch) { - if(data->wildcard.state != CURLWC_DONE) { + if(data->wildcard->state != CURLWC_DONE) { /* if a wildcard is set and we are not ending -> lets start again with MSTATE_INIT */ multistate(data, MSTATE_INIT); |