From 46bdb81107d91a0d9b14ec126bde59114db1aa75 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 19 Dec 2014 02:17:30 +0000 Subject: - Handle EISCONN PR: ports/196115 Submitted by: Anthony Cornehl --- net/tsocks/Makefile | 3 ++- net/tsocks/files/patch-tsocks.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 net/tsocks/files/patch-tsocks.c (limited to 'net/tsocks') diff --git a/net/tsocks/Makefile b/net/tsocks/Makefile index 5bf388b92cbd..6ddc46554b93 100644 --- a/net/tsocks/Makefile +++ b/net/tsocks/Makefile @@ -3,7 +3,7 @@ PORTNAME= tsocks PORTVERSION= 1.8.b5 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= net security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/1.8%20beta%205 \ http://ftp1.sourceforge.net/tsocks/ \ @@ -45,5 +45,6 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/*.example ${STAGEDIR}${EXAMPLESDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/INSTALL ${STAGEDIR}${DOCSDIR}/README + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so .include diff --git a/net/tsocks/files/patch-tsocks.c b/net/tsocks/files/patch-tsocks.c new file mode 100644 index 000000000000..7d5b4984dbdd --- /dev/null +++ b/net/tsocks/files/patch-tsocks.c @@ -0,0 +1,19 @@ +--- tsocks.c.orig 2014-12-19 02:01:24 UTC ++++ tsocks.c +@@ -852,7 +852,7 @@ 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) { + if (errno != EINPROGRESS) { + show_msg(MSGERR, "Error %d attempting to connect to SOCKS " + "server (%s)\n", errno, strerror(errno)); +@@ -862,6 +862,7 @@ static int connect_server(struct connreq + conn->state = CONNECTING; + } + } else { ++ rc = 0; + show_msg(MSGDEBUG, "Socket %d connected to SOCKS server\n", conn->sockid); + conn->state = CONNECTED; + } -- cgit v1.2.3