diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-03-14 22:22:22 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-03-14 22:22:22 +0100 |
commit | 8831000bc07de463d277975a3ddfb6a31dcf14b4 (patch) | |
tree | 0313bc919a3ee27021c352e9efad38ad8c62407e /lib/sendf.c | |
parent | ed8749e308a9ed0da49ad46b8b2ba5e8aae80244 (diff) | |
download | curl-8831000bc07de463d277975a3ddfb6a31dcf14b4.tar.gz |
protocol handler: added flags field
The protocol handler struct got a 'flags' field for special information
and characteristics of the given protocol.
This now enables us to move away central protocol information such as
CLOSEACTION and DUALCHANNEL from single defines in a central place, out
to each protocol's definition. It also made us stop abusing the protocol
field for other info than the protocol, and we could start cleaning up
other protocol-specific things by adding flags bits to set in the
handler struct.
The "protocol" field connectdata struct was removed as well and the code
now refers directly to the conn->handler->protocol field instead. To
make things work properly, the code now always store a conn->given
pointer that points out the original handler struct so that the code can
learn details from the original protocol even if conn->handler is
modified along the way - for example when switching to go over a HTTP
proxy.
Diffstat (limited to 'lib/sendf.c')
-rw-r--r-- | lib/sendf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sendf.c b/lib/sendf.c index d04371f84..d9e7dbb90 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -441,7 +441,8 @@ CURLcode Curl_client_write(struct connectdata *conn, } if(type & CLIENTWRITE_BODY) { - if((conn->protocol&PROT_FTP) && conn->proto.ftpc.transfertype == 'A') { + if((conn->handler->protocol&PROT_FTP) && + conn->proto.ftpc.transfertype == 'A') { #ifdef CURL_DOES_CONVERSIONS /* convert from the network encoding */ size_t rc; |