minor cosmetic fix when using a proxy
Lee Eakin
Leakin at dfw.Nostrum.com
Wed Apr 2 08:41:26 EST 2003
First, apologies for not testing this before release. I've been spoiled
by such a useful and stable tool.
When using a proxy script to connect (I'm using the connect.c code found
thru google) I get an error message trying to set TCP_NODELAY on a
non-socket. I silenced the message by skipping the call to error only
if errno == ENOTSOCK.
There is probably a better way to handle this, maybe not calling
set_nodelay when a proxy is in use? I just figured reporting it was
better than keeping silent. Apply, mangle, or ignore as you see fit.
See attached.
--
Lee Eakin - leakin at dfw.nostrum.com
I think our coffee machine is networked -- I keep seeing these
dropped sugar packets all around it.
-------------- next part --------------
diff -u misc.c.ORIG misc.c
--- misc.c.ORIG Sun Dec 22 20:44:36 2002
+++ misc.c Mon Mar 31 15:40:18 2003
@@ -97,7 +97,9 @@
optlen = sizeof opt;
if (getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &opt, &optlen) == -1) {
- error("getsockopt TCP_NODELAY: %.100s", strerror(errno));
+ if (errno != ENOTSOCK) {
+ error("getsockopt TCP_NODELAY: %.100s", strerror(errno));
+ }
return;
}
if (opt == 1) {
More information about the openssh-unix-dev
mailing list