diff options
author | Norikatsu Shigemura <nork@FreeBSD.org> | 2007-10-23 16:32:49 +0000 |
---|---|---|
committer | Norikatsu Shigemura <nork@FreeBSD.org> | 2007-10-23 16:32:49 +0000 |
commit | 7014f9a0b5259320c9df262b81d640205d209ed0 (patch) | |
tree | 261b66d293d5b7f70a925bf12a3f85da1bc611f2 /net/stone | |
parent | 9076d86a87bbdcb2491074b09c00c17e1964c422 (diff) |
Notes
Diffstat (limited to 'net/stone')
-rw-r--r-- | net/stone/Makefile | 1 | ||||
-rw-r--r-- | net/stone/files/patch-stone.c | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/net/stone/Makefile b/net/stone/Makefile index 4c2f70e49de1..721cf2d5cb6f 100644 --- a/net/stone/Makefile +++ b/net/stone/Makefile @@ -7,6 +7,7 @@ PORTNAME= stone PORTVERSION= 2.3d +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= http://www.gcd.org/sengoku/stone/ diff --git a/net/stone/files/patch-stone.c b/net/stone/files/patch-stone.c new file mode 100644 index 000000000000..b3f71bc3efe6 --- /dev/null +++ b/net/stone/files/patch-stone.c @@ -0,0 +1,58 @@ +=================================================================== +RCS file: /cvsroot/stone/stone/stone.c,v +retrieving revision 2.3.2.1 +retrieving revision 2.3.2.2 +diff -u -r2.3.2.1 -r2.3.2.2 +--- stone.c 2007/10/05 21:59:48 2.3.2.1 ++++ stone.c 2007/10/22 03:07:17 2.3.2.2 +@@ -93,7 +93,7 @@ + */ + #define VERSION "2.3d" + static char *CVS_ID = +-"@(#) $Id: stone.c,v 2.3.2.1 2007/10/05 21:59:48 hiroaki_sengoku Exp $"; ++"@(#) $Id: stone.c,v 2.3.2.2 2007/10/22 03:07:17 hiroaki_sengoku Exp $"; + + #include <stdio.h> + #include <stdlib.h> +@@ -3047,9 +3047,6 @@ + time(&pair->clock); + if (p) p->clock = pair->clock; + pair->tx += len; +- if ((pair->xhost->mode & XHostsMode_Dump) > 0 +- || ((pair->proto & proto_first_w) && Debug > 3)) +- message_buf(pair, len, "UDP"); + return 0; /* success */ + } + +@@ -3143,9 +3140,15 @@ + if (ex != pair->b) ungetExBuf(ex); + if (pos >= len) { /* complete the packet */ + complete: +- if (!err) err = sendPairUDPbuf(stone, pair, +- (char*)(buf+UDP_HEAD_LEN), +- len-UDP_HEAD_LEN); ++ if (!err) { ++ err = sendPairUDPbuf(stone, pair, (char*)(buf+UDP_HEAD_LEN), ++ len-UDP_HEAD_LEN); ++ if (!err) { ++ if ((pair->xhost->mode & XHostsMode_Dump) > 0 ++ || ((pair->proto & proto_first_w) && Debug > 3)) ++ message_buf(pair, len, "tu"); ++ } ++ } + if (cur != pair->b) ungetExBuf(cur); + cur = NULL; + } +@@ -3810,7 +3813,11 @@ + message(LOG_DEBUG, "%d TCP %d: connecting to TCP %d %s", + p1->stone->sd, p2->sd, p1->sd, addrport); + } +- ret = connect(p1->sd, dst, dstlen); ++ if (p1->proto & proto_dgram) { ++ ret = 0; /* do nothing */ ++ } else { ++ ret = connect(p1->sd, dst, dstlen); ++ } + if (ret < 0) { + #ifdef WINDOWS + errno = WSAGetLastError(); |