summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-17 22:34:22 +1000
committerDamien Miller <djm@mindrot.org>2000-05-17 22:34:22 +1000
commitdcb6ecd1b3b25b6909296ff0546ca6b18d0c19d3 (patch)
tree7eb6d184356f6aa00e62c71565568db706f2e960 /channels.c
parent0e65eed58acc0053d163e96463a7c4d0684e55bd (diff)
- OpenBSD CVS update:
- markus@cvs.openbsd.org [ssh.c] fix usage() [ssh2.h] draft-ietf-secsh-architecture-05.txt [ssh.1] document ssh -T -N (ssh2 only) [channels.c serverloop.c ssh.h sshconnect.c sshd.c aux.c] enable nonblocking IO for sshd w/ proto 1, too; split out common code [aux.c] missing include
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/channels.c b/channels.c
index a18c7e300..f26b3a65b 100644
--- a/channels.c
+++ b/channels.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: channels.c,v 1.30 2000/05/09 01:02:59 damien Exp $"); 20RCSID("$Id: channels.c,v 1.31 2000/05/17 12:34:23 damien Exp $");
21 21
22#include "ssh.h" 22#include "ssh.h"
23#include "packet.h" 23#include "packet.h"
@@ -147,23 +147,6 @@ channel_lookup(int id)
147 return c; 147 return c;
148} 148}
149 149
150void
151set_nonblock(int fd)
152{
153 int val;
154 val = fcntl(fd, F_GETFL, 0);
155 if (val < 0) {
156 error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno));
157 return;
158 }
159 if (val & O_NONBLOCK)
160 return;
161 debug("fd %d setting O_NONBLOCK", fd);
162 val |= O_NONBLOCK;
163 if (fcntl(fd, F_SETFL, val) == -1)
164 error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", fd, strerror(errno));
165}
166
167/* 150/*
168 * Register filedescriptors for a channel, used when allocating a channel or 151 * Register filedescriptors for a channel, used when allocating a channel or
169 * when the channel consumer/producer is ready, e.g. shell exec'd 152 * when the channel consumer/producer is ready, e.g. shell exec'd