From 1f5198a238aa0d3c4d309e16a42556f52be62dff Mon Sep 17 00:00:00 2001 From: z3APA3A <3APA3A@3proxy.ru> Date: Tue, 1 Jul 2014 21:31:57 +0400 Subject: [PATCH] Keep 2-digit error codes for socket operations 2 digit codes are common for all modules, should not be changed --- src/socks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socks.c b/src/socks.c index a48ffbf..184cc5c 100644 --- a/src/socks.c +++ b/src/socks.c @@ -192,7 +192,7 @@ void * sockschild(struct clientparam* param) { if(command > 1) { if(so._bind(param->remsock,(struct sockaddr *)¶m->sins,sizeof(param->sins))) { param->sins.sin_port = 0; - if(so._bind(param->remsock,(struct sockaddr *)¶m->sins,sizeof(param->sins)))RETURN (11); + if(so._bind(param->remsock,(struct sockaddr *)¶m->sins,sizeof(param->sins)))RETURN (12); #if SOCKSTRACE > 0 fprintf(stderr, "%s:%hu binded to communicate with server\n", inet_ntoa(param->sins.sin_addr), @@ -209,7 +209,7 @@ fflush(stderr); if(param->clisock == INVALID_SOCKET) {RETURN(11);} memcpy(&sin, ¶m->sincl, sizeof(&sin)); *SAPORT(&sin) = htons(0); - if(so._bind(param->clisock,(struct sockaddr *)&sin,sizeof(sin))) {RETURN (11);} + if(so._bind(param->clisock,(struct sockaddr *)&sin,sizeof(sin))) {RETURN (12);} #if SOCKSTRACE > 0 fprintf(stderr, "%hu binded to communicate with client\n", ntohs(*SAPORT(&sin))