summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-08-30 03:59:08 +0000
committerDamien Miller <djm@mindrot.org>2017-09-04 09:38:57 +1000
commit71e5a536ec815d542b199f2ae6d646c0db9f1b58 (patch)
treee5b03199a74b43fa69af7a047b2480a132d69e80 /channels.c
parent6227fe5b362239c872b91bbdee4bf63cf85aebc5 (diff)
upstream commit
pass packet state down to some of the channels function (more to come...); ok markus@ Upstream-ID: d8ce7a94f4059d7ac1e01fb0eb01de0c4b36c81b
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/channels.c b/channels.c
index 028d5db20..d9e81b5fa 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.365 2017/05/31 08:58:52 deraadt Exp $ */ 1/* $OpenBSD: channels.c,v 1.366 2017/08/30 03:59:08 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1996,8 +1996,8 @@ channel_garbage_collect(Channel *c)
1996} 1996}
1997 1997
1998static void 1998static void
1999channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset, 1999channel_handler(struct ssh *ssh, chan_fn *ftab[],
2000 time_t *unpause_secs) 2000 fd_set *readset, fd_set *writeset, time_t *unpause_secs)
2001{ 2001{
2002 static int did_init = 0; 2002 static int did_init = 0;
2003 u_int i, oalloc; 2003 u_int i, oalloc;
@@ -2052,8 +2052,8 @@ channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset,
2052 * select bitmasks. 2052 * select bitmasks.
2053 */ 2053 */
2054void 2054void
2055channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, 2055channel_prepare_select(struct ssh *ssh, fd_set **readsetp, fd_set **writesetp,
2056 u_int *nallocp, time_t *minwait_secs, int rekeying) 2056 int *maxfdp, u_int *nallocp, time_t *minwait_secs)
2057{ 2057{
2058 u_int n, sz, nfdset; 2058 u_int n, sz, nfdset;
2059 2059
@@ -2075,8 +2075,8 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
2075 memset(*readsetp, 0, sz); 2075 memset(*readsetp, 0, sz);
2076 memset(*writesetp, 0, sz); 2076 memset(*writesetp, 0, sz);
2077 2077
2078 if (!rekeying) 2078 if (!ssh_packet_is_rekeying(ssh))
2079 channel_handler(channel_pre, *readsetp, *writesetp, 2079 channel_handler(ssh, channel_pre, *readsetp, *writesetp,
2080 minwait_secs); 2080 minwait_secs);
2081} 2081}
2082 2082
@@ -2085,9 +2085,9 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
2085 * events pending. 2085 * events pending.
2086 */ 2086 */
2087void 2087void
2088channel_after_select(fd_set *readset, fd_set *writeset) 2088channel_after_select(struct ssh *ssh, fd_set *readset, fd_set *writeset)
2089{ 2089{
2090 channel_handler(channel_post, readset, writeset, NULL); 2090 channel_handler(ssh, channel_post, readset, writeset, NULL);
2091} 2091}
2092 2092
2093 2093