1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2025-02-08 22:03:09 +08:00

fixed usage of int instead of socklen_t

This commit is contained in:
rofl0r 2011-09-02 22:53:50 +02:00
parent 86be015f0d
commit a6792b937d

View File

@ -14,9 +14,6 @@
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <unistd.h>
@ -34,6 +31,7 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <time.h>
#include <sys/time.h>
#include <stdarg.h>
#include "core.h"
@ -180,7 +178,8 @@ static int read_n_bytes(int fd,char *buff, size_t size)
static int timed_connect(int sock, const struct sockaddr *addr, unsigned int len)
{
int ret,value,value_len;
int ret, value;
socklen_t value_len;
struct pollfd pfd[1];
pfd[0].fd=sock;
@ -192,7 +191,7 @@ static int timed_connect(int sock, const struct sockaddr *addr, unsigned int len
ret=poll_retry(pfd,1,tcp_connect_time_out);
//printf("\npoll ret=%d\n",ret);fflush(stdout);
if(ret == 1) {
value_len=sizeof(int);
value_len=sizeof(socklen_t);
getsockopt(sock,SOL_SOCKET,SO_ERROR,&value,&value_len) ;
//printf("\nvalue=%d\n",value);fflush(stdout);
if(!value)