mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
curl_socket_t mistakes cleanup
This commit is contained in:
parent
85838a8966
commit
7225b14002
@ -750,7 +750,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
|
||||
fd_set readfd;
|
||||
char *line_start;
|
||||
char *host_port;
|
||||
int tunnelsocket = conn->sock[sockindex];
|
||||
curl_socket_t tunnelsocket = conn->sock[sockindex];
|
||||
|
||||
#define SELECT_OK 0
|
||||
#define SELECT_ERROR 1
|
||||
|
@ -279,8 +279,8 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||
FD_SET(sockfd, write_fd_set);
|
||||
}
|
||||
|
||||
if(sockfd > *max_fd)
|
||||
*max_fd = sockfd;
|
||||
if((int)sockfd > *max_fd)
|
||||
*max_fd = (int)sockfd;
|
||||
}
|
||||
break;
|
||||
case CURLM_STATE_PERFORM:
|
||||
|
@ -23,7 +23,8 @@
|
||||
* $Id$
|
||||
***************************************************************************/
|
||||
|
||||
CURLcode Curl_sendf(int fd, struct connectdata *, const char *fmt, ...);
|
||||
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
|
||||
const char *fmt, ...);
|
||||
void Curl_infof(struct SessionHandle *, const char *fmt, ...);
|
||||
void Curl_failf(struct SessionHandle *, const char *fmt, ...);
|
||||
|
||||
@ -42,7 +43,8 @@ int Curl_read(struct connectdata *conn, curl_socket_t sockfd,
|
||||
char *buf, size_t buffersize,
|
||||
ssize_t *n);
|
||||
/* internal write-function, does plain socket, SSL and krb4 */
|
||||
CURLcode Curl_write(struct connectdata *conn, int sockfd,
|
||||
CURLcode Curl_write(struct connectdata *conn,
|
||||
curl_socket_t sockfd,
|
||||
void *mem, size_t len,
|
||||
ssize_t *written);
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* $Id$
|
||||
***************************************************************************/
|
||||
#include "urldata.h"
|
||||
CURLcode Curl_SSLConnect(struct connectdata *conn, curl_socket_t sockfd);
|
||||
CURLcode Curl_SSLConnect(struct connectdata *conn, int sockindex);
|
||||
|
||||
void Curl_SSL_init(void); /* Global SSL init */
|
||||
void Curl_SSL_cleanup(void); /* Global SSL cleanup */
|
||||
|
@ -1368,7 +1368,10 @@ void Curl_single_fdset(struct connectdata *conn,
|
||||
}
|
||||
if(conn->keep.keepon & KEEP_WRITE) {
|
||||
FD_SET(conn->writesockfd, write_fd_set);
|
||||
if(conn->writesockfd > *max_fd)
|
||||
|
||||
/* since sockets are curl_socket_t nowadays, we typecast it to int here
|
||||
to compare it nicely */
|
||||
if((int)conn->writesockfd > *max_fd)
|
||||
*max_fd = conn->writesockfd;
|
||||
conn->keep.writefdp = write_fd_set; /* store the address of the set */
|
||||
}
|
||||
|
@ -37,14 +37,13 @@ CURLcode Curl_readwrite_init(struct connectdata *conn);
|
||||
/* This sets up a forthcoming transfer */
|
||||
CURLcode
|
||||
Curl_Transfer (struct connectdata *data,
|
||||
curl_socket_t sockfd, /* socket to read from or
|
||||
CURL_SOCKET_BAD */
|
||||
int sockindex, /* socket index to read from or -1 */
|
||||
curl_off_t size, /* -1 if unknown at this point */
|
||||
bool getheader, /* TRUE if header parsing is wanted */
|
||||
curl_off_t *bytecountp, /* return number of bytes read */
|
||||
curl_socket_t writesockfd, /* socket to write to, it may very
|
||||
well be the same we read from.
|
||||
CURL_SOCKET_BAD disables */
|
||||
int writesockindex, /* socket index to write to, it may
|
||||
very well be the same we read from.
|
||||
-1 disables */
|
||||
curl_off_t *writecountp /* return number of bytes written */
|
||||
);
|
||||
#endif
|
||||
|
@ -1378,7 +1378,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
|
||||
* be dead. Most commonly this happens when the server has closed the
|
||||
* connection due to inactivity.
|
||||
*/
|
||||
static bool SocketIsDead(int sock)
|
||||
static bool SocketIsDead(curl_socket_t sock)
|
||||
{
|
||||
int sval;
|
||||
bool ret_val = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user