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.
This commit is contained in:
Daniel Stenberg 2014-03-05 17:38:05 +00:00
parent 0b3750b5c2
commit 219a0fbe76
4 changed files with 8 additions and 8 deletions

View file

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -92,7 +92,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn)
CURLcode Curl_proxyCONNECT(struct connectdata *conn,
int sockindex,
const char *hostname,
unsigned short remote_port)
int remote_port)
{
int subversion=0;
struct SessionHandle *data=conn->data;