diff options
author | Patrick Monnerat <Patrick.Monnerat@datasphere.ch> | 2007-10-12 13:36:37 +0000 |
---|---|---|
committer | Patrick Monnerat <Patrick.Monnerat@datasphere.ch> | 2007-10-12 13:36:37 +0000 |
commit | 07b6e7363d910ad4828376d568a2f19fd8d64661 (patch) | |
tree | 1b61554caff5805e38ee72f2151e80c0675610ae /lib/file.c | |
parent | 2741f97a69e79a8489e395f105bff0d92567bc21 (diff) | |
download | curl-07b6e7363d910ad4828376d568a2f19fd8d64661.tar.gz |
Added per-protocol callback static tables, replacing callback ptr storage
in the connectdata structure by a single handler table ptr.
Diffstat (limited to 'lib/file.c')
-rw-r--r-- | lib/file.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/file.c b/lib/file.c index 88d6bf26a..dcee427ee 100644 --- a/lib/file.c +++ b/lib/file.c @@ -89,6 +89,33 @@ /* The last #include file should be: */ #include "memdebug.h" + +/* + * Forward declarations. + */ + +static CURLcode Curl_file(struct connectdata *, bool *done); + +/* + * FILE scheme handler. + */ + +const struct Curl_handler Curl_handler_file = { + "FILE", /* scheme */ + NULL, /* setup_connection */ + Curl_file, /* do_it */ + Curl_file_done, /* done */ + NULL, /* do_more */ + NULL, /* connect_it */ + NULL, /* connecting */ + NULL, /* doing */ + NULL, /* proto_getsock */ + NULL, /* doing_getsock */ + NULL, /* disconnect */ + 0, /* defport */ + PROT_FILE /* protocol */ +}; + /* * Curl_file_connect() gets called from Curl_protocol_connect() to allow us to * do protocol-specific actions at connect-time. We emulate a @@ -316,7 +343,7 @@ static CURLcode file_upload(struct connectdata *conn) * opposed to sockets) we instead perform the whole do-operation in this * function. */ -CURLcode Curl_file(struct connectdata *conn, bool *done) +static CURLcode Curl_file(struct connectdata *conn, bool *done) { /* This implementation ignores the host name in conformance with RFC 1738. Only local files (reachable via the standard file system) |