Loading lib/connect.c +9 −9 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ #include "memdebug.h" #endif static bool verifyconnect(int sockfd); static bool verifyconnect(curl_socket_t sockfd); int Curl_ourerrno(void) { Loading @@ -104,7 +104,7 @@ int Curl_ourerrno(void) * Set the socket to either blocking or non-blocking mode. */ int Curl_nonblock(int sockfd, /* operate on this */ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */ int nonblock /* TRUE or FALSE */) { #undef SETBLOCK Loading Loading @@ -168,7 +168,7 @@ int Curl_nonblock(int sockfd, /* operate on this */ * 2 select() returned with an error condition */ static int waitconnect(int sockfd, /* socket */ int waitconnect(curl_socket_t sockfd, /* socket */ long timeout_msec) { fd_set fd; Loading Loading @@ -212,7 +212,7 @@ int waitconnect(int sockfd, /* socket */ } static CURLcode bindlocal(struct connectdata *conn, int sockfd) curl_socket_t sockfd) { #ifdef HAVE_INET_NTOA bool bindworked = FALSE; Loading Loading @@ -401,7 +401,7 @@ static CURLcode bindlocal(struct connectdata *conn, /* * verifyconnect() returns TRUE if the connect really has happened. */ static bool verifyconnect(int sockfd) static bool verifyconnect(curl_socket_t sockfd) { #if defined(SO_ERROR) && !defined(WIN32) int err = 0; Loading @@ -427,7 +427,7 @@ static bool verifyconnect(int sockfd) */ CURLcode Curl_is_connected(struct connectdata *conn, int sockfd, curl_socket_t sockfd, bool *connected) { int rc; Loading Loading @@ -505,13 +505,13 @@ CURLcode Curl_is_connected(struct connectdata *conn, CURLcode Curl_connecthost(struct connectdata *conn, /* context */ struct Curl_dns_entry *remotehost, /* use this one */ int port, /* connect to this */ int *sockconn, /* the connected socket */ curl_socket_t *sockconn, /* the connected socket */ Curl_ipconnect **addr, /* the one we used */ bool *connected) /* really connected? */ { struct SessionHandle *data = conn->data; int rc; int sockfd=-1; curl_socket_t sockfd= CURL_SOCKET_BAD; int aliasindex=0; char *hostname; Loading Loading @@ -587,7 +587,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ /* create an IPv4 TCP socket */ sockfd = socket(AF_INET, SOCK_STREAM, 0); if(-1 == sockfd) { if(CURL_SOCKET_BAD == sockfd) { failf(data, "couldn't create socket"); return CURLE_COULDNT_CONNECT; /* big time error */ } Loading lib/connect.h +3 −3 Original line number Diff line number Diff line Loading @@ -23,17 +23,17 @@ * $Id$ ***************************************************************************/ int Curl_nonblock(int sockfd, /* operate on this */ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */ int nonblock /* TRUE or FALSE */); CURLcode Curl_is_connected(struct connectdata *conn, int sockfd, curl_socket_t sockfd, bool *connected); CURLcode Curl_connecthost(struct connectdata *conn, struct Curl_dns_entry *host, /* connect to this */ int port, /* connect to this port number */ int *sockconn, /* not set if error is returned */ curl_socket_t *sockconn, /* not set if error */ Curl_ipconnect **addr, /* the one we used */ bool *connected /* truly connected? */ ); Loading lib/dict.c +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ CURLcode Curl_dict(struct connectdata *conn) by RFC 2229 */ CURLcode result=CURLE_OK; struct SessionHandle *data=conn->data; int sockfd = conn->sock[FIRSTSOCKET]; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; char *path = conn->path; curl_off_t *bytecount = &conn->bytecount; Loading lib/ftp.c +9 −9 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn) fd_set rdset; struct timeval dt; struct SessionHandle *data = conn->data; int sock = conn->sock[SECONDARYSOCKET]; curl_socket_t sock = conn->sock[SECONDARYSOCKET]; struct timeval now = Curl_tvnow(); long timespent = Curl_tvdiff(Curl_tvnow(), now)/1000; long timeout = data->set.connecttimeout?data->set.connecttimeout: Loading Loading @@ -211,7 +211,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ * Alas, read as much as possible, split up into lines, use the ending * line in a response or continue reading. */ int sockfd = conn->sock[FIRSTSOCKET]; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; int perline; /* count bytes per line */ bool keepon=TRUE; ssize_t gotbytes; Loading Loading @@ -1103,7 +1103,7 @@ static CURLcode ftp_use_port(struct connectdata *conn) { struct SessionHandle *data=conn->data; int portsock=-1; curl_socket_t portsock= CURL_SOCKET_BAD; ssize_t nread; int ftpcode; /* receive FTP response codes in this */ CURLcode result; Loading Loading @@ -1166,7 +1166,7 @@ CURLcode ftp_use_port(struct connectdata *conn) return CURLE_FTP_PORT_FAILED; } portsock = -1; portsock = CURL_SOCKET_BAD; for (ai = res; ai; ai = ai->ai_next) { /* * Workaround for AIX5 getaddrinfo() problem (it doesn't set ai_socktype): Loading @@ -1175,25 +1175,25 @@ CURLcode ftp_use_port(struct connectdata *conn) ai->ai_socktype = hints.ai_socktype; portsock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (portsock < 0) if (portsock == CURL_SOCKET_BAD) continue; if (bind(portsock, ai->ai_addr, ai->ai_addrlen) < 0) { sclose(portsock); portsock = -1; portsock = CURL_SOCKET_BAD; continue; } if (listen(portsock, 1) < 0) { sclose(portsock); portsock = -1; portsock = CURL_SOCKET_BAD; continue; } break; } freeaddrinfo(res); if (portsock < 0) { if (portsock == CURL_SOCKET_BAD) { failf(data, "%s", strerror(errno)); return CURLE_FTP_PORT_FAILED; } Loading Loading @@ -1378,7 +1378,7 @@ CURLcode ftp_use_port(struct connectdata *conn) Curl_resolv_unlock(data, h); if ( h || sa_filled_in) { if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) { if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) != CURL_SOCKET_BAD ) { int size; /* we set the secondary socket variable to this for now, it Loading lib/http.c +1 −1 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ CURLcode add_buffer_send(send_buffer *in, size_t size; struct HTTP *http = conn->proto.http; size_t sendsize; int sockfd = conn->sock[FIRSTSOCKET]; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; /* The looping below is required since we use non-blocking sockets, but due to the circumstances we will just loop and try again and again etc */ Loading Loading
lib/connect.c +9 −9 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ #include "memdebug.h" #endif static bool verifyconnect(int sockfd); static bool verifyconnect(curl_socket_t sockfd); int Curl_ourerrno(void) { Loading @@ -104,7 +104,7 @@ int Curl_ourerrno(void) * Set the socket to either blocking or non-blocking mode. */ int Curl_nonblock(int sockfd, /* operate on this */ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */ int nonblock /* TRUE or FALSE */) { #undef SETBLOCK Loading Loading @@ -168,7 +168,7 @@ int Curl_nonblock(int sockfd, /* operate on this */ * 2 select() returned with an error condition */ static int waitconnect(int sockfd, /* socket */ int waitconnect(curl_socket_t sockfd, /* socket */ long timeout_msec) { fd_set fd; Loading Loading @@ -212,7 +212,7 @@ int waitconnect(int sockfd, /* socket */ } static CURLcode bindlocal(struct connectdata *conn, int sockfd) curl_socket_t sockfd) { #ifdef HAVE_INET_NTOA bool bindworked = FALSE; Loading Loading @@ -401,7 +401,7 @@ static CURLcode bindlocal(struct connectdata *conn, /* * verifyconnect() returns TRUE if the connect really has happened. */ static bool verifyconnect(int sockfd) static bool verifyconnect(curl_socket_t sockfd) { #if defined(SO_ERROR) && !defined(WIN32) int err = 0; Loading @@ -427,7 +427,7 @@ static bool verifyconnect(int sockfd) */ CURLcode Curl_is_connected(struct connectdata *conn, int sockfd, curl_socket_t sockfd, bool *connected) { int rc; Loading Loading @@ -505,13 +505,13 @@ CURLcode Curl_is_connected(struct connectdata *conn, CURLcode Curl_connecthost(struct connectdata *conn, /* context */ struct Curl_dns_entry *remotehost, /* use this one */ int port, /* connect to this */ int *sockconn, /* the connected socket */ curl_socket_t *sockconn, /* the connected socket */ Curl_ipconnect **addr, /* the one we used */ bool *connected) /* really connected? */ { struct SessionHandle *data = conn->data; int rc; int sockfd=-1; curl_socket_t sockfd= CURL_SOCKET_BAD; int aliasindex=0; char *hostname; Loading Loading @@ -587,7 +587,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ /* create an IPv4 TCP socket */ sockfd = socket(AF_INET, SOCK_STREAM, 0); if(-1 == sockfd) { if(CURL_SOCKET_BAD == sockfd) { failf(data, "couldn't create socket"); return CURLE_COULDNT_CONNECT; /* big time error */ } Loading
lib/connect.h +3 −3 Original line number Diff line number Diff line Loading @@ -23,17 +23,17 @@ * $Id$ ***************************************************************************/ int Curl_nonblock(int sockfd, /* operate on this */ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */ int nonblock /* TRUE or FALSE */); CURLcode Curl_is_connected(struct connectdata *conn, int sockfd, curl_socket_t sockfd, bool *connected); CURLcode Curl_connecthost(struct connectdata *conn, struct Curl_dns_entry *host, /* connect to this */ int port, /* connect to this port number */ int *sockconn, /* not set if error is returned */ curl_socket_t *sockconn, /* not set if error */ Curl_ipconnect **addr, /* the one we used */ bool *connected /* truly connected? */ ); Loading
lib/dict.c +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ CURLcode Curl_dict(struct connectdata *conn) by RFC 2229 */ CURLcode result=CURLE_OK; struct SessionHandle *data=conn->data; int sockfd = conn->sock[FIRSTSOCKET]; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; char *path = conn->path; curl_off_t *bytecount = &conn->bytecount; Loading
lib/ftp.c +9 −9 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn) fd_set rdset; struct timeval dt; struct SessionHandle *data = conn->data; int sock = conn->sock[SECONDARYSOCKET]; curl_socket_t sock = conn->sock[SECONDARYSOCKET]; struct timeval now = Curl_tvnow(); long timespent = Curl_tvdiff(Curl_tvnow(), now)/1000; long timeout = data->set.connecttimeout?data->set.connecttimeout: Loading Loading @@ -211,7 +211,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ * Alas, read as much as possible, split up into lines, use the ending * line in a response or continue reading. */ int sockfd = conn->sock[FIRSTSOCKET]; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; int perline; /* count bytes per line */ bool keepon=TRUE; ssize_t gotbytes; Loading Loading @@ -1103,7 +1103,7 @@ static CURLcode ftp_use_port(struct connectdata *conn) { struct SessionHandle *data=conn->data; int portsock=-1; curl_socket_t portsock= CURL_SOCKET_BAD; ssize_t nread; int ftpcode; /* receive FTP response codes in this */ CURLcode result; Loading Loading @@ -1166,7 +1166,7 @@ CURLcode ftp_use_port(struct connectdata *conn) return CURLE_FTP_PORT_FAILED; } portsock = -1; portsock = CURL_SOCKET_BAD; for (ai = res; ai; ai = ai->ai_next) { /* * Workaround for AIX5 getaddrinfo() problem (it doesn't set ai_socktype): Loading @@ -1175,25 +1175,25 @@ CURLcode ftp_use_port(struct connectdata *conn) ai->ai_socktype = hints.ai_socktype; portsock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (portsock < 0) if (portsock == CURL_SOCKET_BAD) continue; if (bind(portsock, ai->ai_addr, ai->ai_addrlen) < 0) { sclose(portsock); portsock = -1; portsock = CURL_SOCKET_BAD; continue; } if (listen(portsock, 1) < 0) { sclose(portsock); portsock = -1; portsock = CURL_SOCKET_BAD; continue; } break; } freeaddrinfo(res); if (portsock < 0) { if (portsock == CURL_SOCKET_BAD) { failf(data, "%s", strerror(errno)); return CURLE_FTP_PORT_FAILED; } Loading Loading @@ -1378,7 +1378,7 @@ CURLcode ftp_use_port(struct connectdata *conn) Curl_resolv_unlock(data, h); if ( h || sa_filled_in) { if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) { if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) != CURL_SOCKET_BAD ) { int size; /* we set the secondary socket variable to this for now, it Loading
lib/http.c +1 −1 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ CURLcode add_buffer_send(send_buffer *in, size_t size; struct HTTP *http = conn->proto.http; size_t sendsize; int sockfd = conn->sock[FIRSTSOCKET]; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; /* The looping below is required since we use non-blocking sockets, but due to the circumstances we will just loop and try again and again etc */ Loading