mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2025-09-03 06:16:56 +00:00
fixed usage of int instead of socklen_t
This commit is contained in:
@ -14,9 +14,6 @@
|
|||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -34,6 +31,7 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "core.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)
|
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];
|
struct pollfd pfd[1];
|
||||||
|
|
||||||
pfd[0].fd=sock;
|
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);
|
ret=poll_retry(pfd,1,tcp_connect_time_out);
|
||||||
//printf("\npoll ret=%d\n",ret);fflush(stdout);
|
//printf("\npoll ret=%d\n",ret);fflush(stdout);
|
||||||
if(ret == 1) {
|
if(ret == 1) {
|
||||||
value_len=sizeof(int);
|
value_len=sizeof(socklen_t);
|
||||||
getsockopt(sock,SOL_SOCKET,SO_ERROR,&value,&value_len) ;
|
getsockopt(sock,SOL_SOCKET,SO_ERROR,&value,&value_len) ;
|
||||||
//printf("\nvalue=%d\n",value);fflush(stdout);
|
//printf("\nvalue=%d\n",value);fflush(stdout);
|
||||||
if(!value)
|
if(!value)
|
||||||
|
Reference in New Issue
Block a user