summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
authormouring <mouring>2001-07-18 16:01:46 +0000
committermouring <mouring>2001-07-18 16:01:46 +0000
commit79a35a5ad2d6c0cd788e621928f345c1c283e84e (patch)
tree492ba141a1108144a0c131f5911a1cc9fcc78758 /nchan.c
parent5568a673cc5f0fd00da2c8f3ba7bd1c8126d7f60 (diff)
downloadopenssh-79a35a5ad2d6c0cd788e621928f345c1c283e84e.tar.gz
- markus@cvs.openbsd.org 2001/07/17 21:04:58
[channels.c channels.h clientloop.c nchan.c serverloop.c] keep track of both maxfd and the size of the malloc'ed fdsets. update maxfd if maxfd gets closed.
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/nchan.c b/nchan.c
index 8e1be2d3..43d80bf2 100644
--- a/nchan.c
+++ b/nchan.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: nchan.c,v 1.30 2001/06/25 08:25:38 markus Exp $");
+RCSID("$OpenBSD: nchan.c,v 1.31 2001/07/17 21:04:57 markus Exp $");
#include "ssh1.h"
#include "ssh2.h"
@@ -518,11 +518,10 @@ chan_shutdown_write(Channel *c)
"shutdown() failed for fd%d: %.100s",
c->self, c->sock, strerror(errno));
} else {
- if (close(c->wfd) < 0)
+ if (channel_close_fd(&c->wfd) < 0)
log("channel %d: chan_shutdown_write: "
"close() failed for fd%d: %.100s",
c->self, c->wfd, strerror(errno));
- c->wfd = -1;
}
}
static void
@@ -544,10 +543,9 @@ chan_shutdown_read(Channel *c)
c->self, c->sock, c->istate, c->ostate,
strerror(errno));
} else {
- if (close(c->rfd) < 0)
+ if (channel_close_fd(&c->rfd) < 0)
log("channel %d: chan_shutdown_read: "
"close() failed for fd%d: %.100s",
c->self, c->rfd, strerror(errno));
- c->rfd = -1;
}
}