diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-11-23 08:32:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-23 16:16:16 +0100 |
commit | a95a6ce6b809693a1195e3b4347a6cfa0fbc2ee7 (patch) | |
tree | 5f0b777ade4540e7c622b6ad2d2126d920dafa6b /lib/urldata.h | |
parent | 5c8849cede5577b8b23c3b1d75c03923ce034061 (diff) | |
download | curl-a95a6ce6b809693a1195e3b4347a6cfa0fbc2ee7.tar.gz |
urldata: remove 'void *protop' and create the union 'p'
... to avoid the use of 'void *' for the protocol specific structs done
per transfer.
Closes #6238
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index a3c2b3cf3..805957153 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -643,8 +643,23 @@ struct SingleRequest { and the 'upload_present' contains the number of bytes available at this position */ char *upload_fromhere; - void *protop; /* Allocated protocol-specific data. Each protocol - handler makes sure this points to data it needs. */ + + /* Allocated protocol-specific data. Each protocol handler makes sure this + points to data it needs. */ + union { + struct FILEPROTO *file; + struct FTP *ftp; + struct HTTP *http; + struct IMAP *imap; + struct ldapreqinfo *ldap; + struct MQTT *mqtt; + struct POP3 *pop3; + struct RTSP *rtsp; + struct smb_request *smb; + struct SMTP *smtp; + struct SSHPROTO *ssh; + struct TELNET *telnet; + } p; #ifndef CURL_DISABLE_DOH struct dohdata doh; /* DoH specific data for this request */ #endif |