diff options
Diffstat (limited to 'net/tsocks/patches')
-rw-r--r-- | net/tsocks/patches/patch-ac | 30 | ||||
-rw-r--r-- | net/tsocks/patches/patch-ad | 19 |
2 files changed, 47 insertions, 2 deletions
diff --git a/net/tsocks/patches/patch-ac b/net/tsocks/patches/patch-ac index 40696e1381e..7437d0875c3 100644 --- a/net/tsocks/patches/patch-ac +++ b/net/tsocks/patches/patch-ac @@ -1,6 +1,9 @@ -$NetBSD: patch-ac,v 1.1 2005/08/04 10:22:21 drochner Exp $ +$NetBSD: patch-ac,v 1.2 2006/09/17 11:45:04 jmmv Exp $ ---- tsocks.c.orig 2005-08-04 11:46:19.000000000 +0200 +Except for the first two chunks: +https://sourceforge.net/tracker/index.php?func=detail&aid=1252703&group_id=17338&atid=117338 + +--- tsocks.c.orig 2002-07-16 00:50:52.000000000 +0200 +++ tsocks.c @@ -68,7 +68,7 @@ static int suid = 0; static char *conffile = NULL; @@ -20,3 +23,26 @@ $NetBSD: patch-ac,v 1.1 2005/08/04 10:22:21 drochner Exp $ #ifdef USE_OLD_DLSYM void *lib; #endif +@@ -658,7 +658,7 @@ int poll(POLL_SIGNATURE) { + * come around again (since we can't flag it for read, we don't know + * if there is any data to be read and can't be bothered checking) */ + if (conn->selectevents & WRITE) { +- setevents |= POLLOUT; ++ ufds[i].revents |= (conn->selectevents & WRITE); + nevents++; + } + } +@@ -852,7 +852,12 @@ static int connect_server(struct connreq + sizeof(conn->serveraddr)); + + show_msg(MSGDEBUG, "Connect returned %d, errno is %d\n", rc, errno); +- if (rc) { ++ if (rc && errno == EISCONN) { ++ rc = 0; ++ show_msg(MSGDEBUG, "Socket %d already connected to SOCKET server\n", ++ conn->sockid); ++ conn->state = CONNECTED; ++ } else if (rc) { + if (errno != EINPROGRESS) { + show_msg(MSGERR, "Error %d attempting to connect to SOCKS " + "server (%s)\n", errno, strerror(errno)); diff --git a/net/tsocks/patches/patch-ad b/net/tsocks/patches/patch-ad new file mode 100644 index 00000000000..bdebe74e1e7 --- /dev/null +++ b/net/tsocks/patches/patch-ad @@ -0,0 +1,19 @@ +$NetBSD: patch-ad,v 1.1 2006/09/17 11:45:04 jmmv Exp $ + +https://sourceforge.net/tracker/index.php?func=detail&aid=1252703&group_id=17338&atid=117338 + +--- tsocks.h.orig 2002-03-13 13:58:09.000000000 +0100 ++++ tsocks.h +@@ -75,9 +75,9 @@ struct connreq { + #define FAILED 14 + + /* Flags to indicate what events a socket was select()ed for */ +-#define READ (1<<0) +-#define WRITE (1<<1) +-#define EXCEPT (1<<2) ++#define READ (POLLIN|POLLRDNORM) ++#define WRITE (POLLOUT|POLLWRNORM|POLLWRBAND) ++#define EXCEPT (POLLRDBAND|POLLPRI) + #define READWRITE (READ|WRITE) + #define READWRITEEXCEPT (READ|WRITE|EXCEPT) + |