aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-03-05 17:38:05 +0000
committerDaniel Stenberg <daniel@haxx.se>2014-03-05 17:38:05 +0000
commit219a0fbe76204e2505a9143aeb149336c7f5683b (patch)
treeee5ece394dd59ab8ec7fc11e04468dca8f1e0c06 /lib/urldata.h
parent0b3750b5c23c25f1bcf4ed95edf8928ce4fd06cc (diff)
remote_port: allow connect to port 0
Port number zero is perfectly allowed to connect to. I moved to storing the remote port number in an int so that -1 means undefined and 0-65535 can be used for legitimate port numbers.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 1ab7b94e9..9d6a9730a 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -388,7 +388,7 @@ struct curl_ssl_session {
void *sessionid; /* as returned from the SSL layer */
size_t idsize; /* if known, otherwise 0 */
long age; /* just a number, the higher the more recent */
- unsigned short remote_port; /* remote port to connect to */
+ int remote_port; /* remote port to connect to */
struct ssl_config_data ssl_config; /* setup for this session */
};
@@ -868,8 +868,7 @@ struct connectdata {
struct hostname proxy;
long port; /* which port to use locally */
- unsigned short remote_port; /* what remote port to connect to,
- not the proxy port! */
+ int remote_port; /* what remote port to connect to, not the proxy port! */
/* 'primary_ip' and 'primary_port' get filled with peer's numerical
ip address and port number whenever an outgoing connection is