diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-08-30 03:59:08 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-09-04 09:38:57 +1000 |
commit | 71e5a536ec815d542b199f2ae6d646c0db9f1b58 (patch) | |
tree | e5b03199a74b43fa69af7a047b2480a132d69e80 /channels.c | |
parent | 6227fe5b362239c872b91bbdee4bf63cf85aebc5 (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.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.365 2017/05/31 08:58:52 deraadt Exp $ */ +/* $OpenBSD: channels.c,v 1.366 2017/08/30 03:59:08 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1996,8 +1996,8 @@ channel_garbage_collect(Channel *c) } static void -channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset, - time_t *unpause_secs) +channel_handler(struct ssh *ssh, chan_fn *ftab[], + fd_set *readset, fd_set *writeset, time_t *unpause_secs) { static int did_init = 0; u_int i, oalloc; @@ -2052,8 +2052,8 @@ channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset, * select bitmasks. */ void -channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, - u_int *nallocp, time_t *minwait_secs, int rekeying) +channel_prepare_select(struct ssh *ssh, fd_set **readsetp, fd_set **writesetp, + int *maxfdp, u_int *nallocp, time_t *minwait_secs) { u_int n, sz, nfdset; @@ -2075,8 +2075,8 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, memset(*readsetp, 0, sz); memset(*writesetp, 0, sz); - if (!rekeying) - channel_handler(channel_pre, *readsetp, *writesetp, + if (!ssh_packet_is_rekeying(ssh)) + channel_handler(ssh, channel_pre, *readsetp, *writesetp, minwait_secs); } @@ -2085,9 +2085,9 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, * events pending. */ void -channel_after_select(fd_set *readset, fd_set *writeset) +channel_after_select(struct ssh *ssh, fd_set *readset, fd_set *writeset) { - channel_handler(channel_post, readset, writeset, NULL); + channel_handler(ssh, channel_post, readset, writeset, NULL); } |