1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-11 22:23:24 +00:00

Option so-reuseport did not work

This commit is contained in:
Gerhard Rieger 2016-02-06 16:36:39 +01:00
parent 2ea6da3839
commit 35a7817e48
4 changed files with 61 additions and 31 deletions

View file

@ -352,12 +352,6 @@ static xiofile_t *xioallocfd(void) {
/* fd->stream.para.exec.pid = 0; */
fd->stream.lineterm = LINETERM_RAW;
/*!! support n socks */
if (!sock[0]) {
sock[0] = fd;
} else {
sock[1] = fd;
}
return fd;
}
@ -376,6 +370,12 @@ xiofile_t *xioopen(const char *addr, /* address specification */
if ((xfd = xioparse_dual(&addr)) == NULL) {
return NULL;
}
/*!! support n socks */
if (!sock[0]) {
sock[0] = xfd;
} else {
sock[1] = xfd;
}
if (xioopen_dual(xfd, xioflags) < 0) {
/*!!! free something? */
return NULL;