mirror of
https://github.com/3proxy/3proxy.git
synced 2025-09-10 04:17:13 +08:00
Compare commits
No commits in common. "2966836dfaa87d2a19a60b9271d3572b7121c9fb" and "6c2ba01394b9a1f9976ab73b0796c821958c744f" have entirely different histories.
2966836dfa
...
6c2ba01394
@ -488,8 +488,8 @@ int connectwithpoll(struct clientparam *param, SOCKET sock, struct sockaddr *sa,
|
|||||||
if(!errno) return 0;
|
if(!errno) return 0;
|
||||||
memset(fds, 0, sizeof(fds));
|
memset(fds, 0, sizeof(fds));
|
||||||
fds[0].fd = sock;
|
fds[0].fd = sock;
|
||||||
fds[0].events = POLLOUT|POLLIN|POLLERR|POLLHUP;
|
fds[0].events = POLLOUT|POLLIN;
|
||||||
if((param?param->srv->so._poll(param->sostate, fds, 1, to*1000):so._poll(so.state, fds, 1, to*1000)) <= 0 || !(fds[0].revents & POLLOUT) || (fds[0].revents & (POLLERR|POLLHUP))) {
|
if((param?param->srv->so._poll(param->sostate, fds, 1, to*1000):so._poll(so.state, fds, 1, to*1000)) <= 0 || !(fds[0].revents & POLLOUT)) {
|
||||||
return (13);
|
return (13);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -506,14 +506,10 @@ for(;;){
|
|||||||
if(action != PASS) RETURN(517);
|
if(action != PASS) RETURN(517);
|
||||||
param->nolongdatfilter = 0;
|
param->nolongdatfilter = 0;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(isconnect && param->redirtype != R_HTTP) {
|
if(isconnect && param->redirtype != R_HTTP) {
|
||||||
socksend(param, param->clisock, (unsigned char *)proxy_stringtable[8], (int)strlen(proxy_stringtable[8]), conf.timeouts[STRING_S]);
|
socksend(param, param->clisock, (unsigned char *)proxy_stringtable[8], (int)strlen(proxy_stringtable[8]), conf.timeouts[STRING_S]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef WITHMAIN
|
|
||||||
if (param->npredatfilters){
|
if (param->npredatfilters){
|
||||||
action = handlepredatflt(param);
|
action = handlepredatflt(param);
|
||||||
if(action == HANDLED){
|
if(action == HANDLED){
|
||||||
|
@ -39,7 +39,7 @@ int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, un
|
|||||||
do {
|
do {
|
||||||
if(conf.timetoexit) return 0;
|
if(conf.timetoexit) return 0;
|
||||||
fds.events = POLLOUT;
|
fds.events = POLLOUT;
|
||||||
res = param?param->srv->so._poll(param->sostate, &fds, 1, to):so._poll(so.state, &fds, 1, to);
|
res = param?param->srv->so._poll(param->sostate, &fds, 1, to*1000):so._poll(so.state, &fds, 1, to*1000);
|
||||||
if(res < 0 && (errno == EAGAIN || errno == EINTR)) continue;
|
if(res < 0 && (errno == EAGAIN || errno == EINTR)) continue;
|
||||||
if(res < 1) break;
|
if(res < 1) break;
|
||||||
res = param?param->srv->so._sendto(param->sostate, sock, (char *)buf + sent, bufsize - sent, 0, sin, SASIZE(sin)):so._sendto(so.state, sock, (char *)buf + sent, bufsize - sent, 0, sin, SASIZE(sin));
|
res = param?param->srv->so._sendto(param->sostate, sock, (char *)buf + sent, bufsize - sent, 0, sin, SASIZE(sin)):so._sendto(so.state, sock, (char *)buf + sent, bufsize - sent, 0, sin, SASIZE(sin));
|
||||||
@ -60,7 +60,7 @@ int sockrecvfrom(struct clientparam *param, SOCKET sock, struct sockaddr * sin,
|
|||||||
fds.fd = sock;
|
fds.fd = sock;
|
||||||
fds.events = POLLIN;
|
fds.events = POLLIN;
|
||||||
if(conf.timetoexit) return EOF;
|
if(conf.timetoexit) return EOF;
|
||||||
res = param?param->srv->so._poll(param->sostate, &fds, 1, to):so._poll(so.state, &fds, 1, to);
|
res = param?param->srv->so._poll(param->sostate, &fds, 1, to*1000):so._poll(so.state, &fds, 1, to*1000);
|
||||||
if (res<1) return 0;
|
if (res<1) return 0;
|
||||||
sasize = SASIZE(sin);
|
sasize = SASIZE(sin);
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user