From 219a0fbe76204e2505a9143aeb149336c7f5683b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 5 Mar 2014 17:38:05 +0000 Subject: 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. --- lib/urldata.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/urldata.h') 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 -- cgit v1.2.3