mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
Keep 2-digit error codes for socket operations
2 digit codes are common for all modules, should not be changed
This commit is contained in:
parent
6b579b8190
commit
1f5198a238
@ -192,7 +192,7 @@ void * sockschild(struct clientparam* param) {
|
|||||||
if(command > 1) {
|
if(command > 1) {
|
||||||
if(so._bind(param->remsock,(struct sockaddr *)¶m->sins,sizeof(param->sins))) {
|
if(so._bind(param->remsock,(struct sockaddr *)¶m->sins,sizeof(param->sins))) {
|
||||||
param->sins.sin_port = 0;
|
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
|
#if SOCKSTRACE > 0
|
||||||
fprintf(stderr, "%s:%hu binded to communicate with server\n",
|
fprintf(stderr, "%s:%hu binded to communicate with server\n",
|
||||||
inet_ntoa(param->sins.sin_addr),
|
inet_ntoa(param->sins.sin_addr),
|
||||||
@ -209,7 +209,7 @@ fflush(stderr);
|
|||||||
if(param->clisock == INVALID_SOCKET) {RETURN(11);}
|
if(param->clisock == INVALID_SOCKET) {RETURN(11);}
|
||||||
memcpy(&sin, ¶m->sincl, sizeof(&sin));
|
memcpy(&sin, ¶m->sincl, sizeof(&sin));
|
||||||
*SAPORT(&sin) = htons(0);
|
*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
|
#if SOCKSTRACE > 0
|
||||||
fprintf(stderr, "%hu binded to communicate with client\n",
|
fprintf(stderr, "%hu binded to communicate with client\n",
|
||||||
ntohs(*SAPORT(&sin))
|
ntohs(*SAPORT(&sin))
|
||||||
|
Loading…
Reference in New Issue
Block a user