summaryrefslogtreecommitdiff
path: root/net/tsocks/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'net/tsocks/patches/patch-ac')
-rw-r--r--net/tsocks/patches/patch-ac30
1 files changed, 28 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));