proxy-suite (1.9.2.4-6) common/com-socket.c

Summary

 common/com-socket.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

--- proxy-suite-1.9.2.4.orig/common/com-socket.c
+++ proxy-suite-1.9.2.4/common/com-socket.c
@@ -311,7 +311,8 @@
 	char peer[PEER_LEN] = {0};
 	char dest[PEER_LEN] = {0};
 	struct sockaddr_in saddr;
-	int nsock, len;
+	int nsock;
+	socklen_t len;
 
 	/*
 	** Let the show begin ...
@@ -1001,7 +1002,8 @@
 
 static void socket_ll_read(HLS *hls)
 {
-	int len, cnt, nsock;
+	int cnt, nsock;
+	socklen_t len;
 	BUF *buf, *tmp;
 	struct sockaddr_in saddr;
 
@@ -1836,7 +1838,8 @@
 u_int32_t socket_sck2addr(int sock, int peer, u_int16_t *port)
 {
 	struct sockaddr_in saddr;
-	int len, r;
+	int r;
+	socklen_t len;
 	char *s;
 
 	/*