[Pkg-privacy-commits] [onioncat] 48/340: changed forwading from write() to send()

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository onioncat.

commit 4b27d0da20ca6b7df3747a8ecc26dd04571d7705
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date:   Wed Apr 23 13:26:37 2008 +0000

    changed forwading from write() to send()
    
    git-svn-id: http://www.cypherpunk.at/svn/onioncat/trunk@201 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
 src/ocatroute.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ocatroute.c b/src/ocatroute.c
index 123abd2..a73c610 100644
--- a/src/ocatroute.c
+++ b/src/ocatroute.c
@@ -62,7 +62,7 @@ uint16_t ocat_ctrl_port_ = OCAT_CTRL_PORT;
 
 int vrec_ = 0;
 
-#define SNDBUF
+//#define SNDBUF
 #ifdef SNDBUF
 int snd_buf_size_ = 0;
 #endif
@@ -156,7 +156,8 @@ int forward_packet(const struct in6_addr *addr, const char *buf, int buflen)
       log_msg(L_ERROR, "could not get OUTQ size: \"%s\"", strerror(errno));
 #endif
 
-   if ((len = write(peer->tcpfd, buf, buflen)) == -1)
+   //if ((len = write(peer->tcpfd, buf, buflen)) == -1)
+   if ((len = send(peer->tcpfd, buf, buflen, MSG_DONTWAIT)) == -1)
    {
       log_msg(L_ERROR, "could not write %d bytes to peer %d: \"%s\", dropping", buflen, peer->tcpfd, strerror(errno));
    }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git



More information about the Pkg-privacy-commits mailing list