aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-08-05 10:32:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-08-12 13:17:57 +0200
commite79535bc5e8e25df8415b6b23671cbd8bd3c83a5 (patch)
treedf811d60b9433abd50856a9f62ee7bb8a3d9cfeb /lib/urldata.h
parent4ad8e142da463ab208d5b5565e53291c8e5ef038 (diff)
SessionHandle: the protocol specific pointer is now a void *
All protocol handler structs are now opaque (void *) in the SessionHandle struct and moved in the request-specific sub-struct 'SingleRequest'. The intension is to keep the protocol specific knowledge in their own dedicated source files [protocol].c etc. There's some "leakage" where this policy is violated, to be addressed at a later point in time.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 7c150a55c..770afe698 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -692,6 +692,9 @@ struct SingleRequest {
bool forbidchunk; /* used only to explicitly forbid chunk-upload for
specific upload buffers. See readmoredata() in
http.c for details. */
+
+ void *protop; /* Allocated protocol-specific data. Each protocol
+ handler makes sure this points to data it needs. */
};
/*
@@ -1274,29 +1277,6 @@ struct UrlState {
long rtsp_next_server_CSeq; /* the session's next server CSeq */
long rtsp_CSeq_recv; /* most recent CSeq received */
- /* Protocol specific data.
- *
- *************************************************************************
- * Note that this data will be freed after each request is DONE, so anything
- * that should be kept/stored on a per-connection basis and thus live for
- * the next request on the same connection MUST be put in the connectdata
- * struct!
- *************************************************************************/
- union {
- struct HTTP *http;
- struct HTTP *https; /* alias, just for the sake of being more readable */
- struct RTSP *rtsp;
- struct FTP *ftp;
- /* void *tftp; not used */
- struct FILEPROTO *file;
- void *telnet; /* private for telnet.c-eyes only */
- void *generic;
- struct SSHPROTO *ssh;
- struct IMAP *imap;
- struct POP3 *pop3;
- struct SMTP *smtp;
- } proto;
-
/* if true, force SSL connection retry (workaround for certain servers) */
bool ssl_connect_retry;
};