diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-02-05 14:32:56 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-02-05 14:32:56 +0000 |
commit | fd362f75091b583aa0226be47339b24782dab8e0 (patch) | |
tree | 509144770a26077693783e980106502bd4c74b2e /usr.bin | |
parent | c870c6f1e4bd2f2b7bc9eb4af6804c6b8a714ead (diff) |
merge channel_request() into channel_request_start()
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/channels.c | 16 | ||||
-rw-r--r-- | usr.bin/ssh/channels.h | 3 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.c | 5 |
3 files changed, 9 insertions, 15 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index c5fc12c1c35..8847785d582 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: channels.c,v 1.165 2002/02/03 17:58:21 markus Exp $"); +RCSID("$OpenBSD: channels.c,v 1.166 2002/02/05 14:32:55 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -588,20 +588,14 @@ channel_send_open(int id) } void -channel_request(int id, char *service, int wantconfirm) +channel_request_start(int local_id, char *service, int wantconfirm) { - channel_request_start(id, service, wantconfirm); - packet_send(); - debug("channel request %d: %s", id, service) ; -} -void -channel_request_start(int id, char *service, int wantconfirm) -{ - Channel *c = channel_lookup(id); + Channel *c = channel_lookup(local_id); if (c == NULL) { - log("channel_request: %d: bad id", id); + log("channel_request_start: %d: unknown channel id", local_id); return; } + debug("channel request %d: %s", local_id, service) ; packet_start(SSH2_MSG_CHANNEL_REQUEST); packet_put_int(c->remote_id); packet_put_cstring(service); diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h index 781c49d479a..7cb0c367cbb 100644 --- a/usr.bin/ssh/channels.h +++ b/usr.bin/ssh/channels.h @@ -32,7 +32,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* RCSID("$OpenBSD: channels.h,v 1.62 2002/02/03 17:58:21 markus Exp $"); */ +/* RCSID("$OpenBSD: channels.h,v 1.63 2002/02/05 14:32:55 markus Exp $"); */ #ifndef CHANNEL_H #define CHANNEL_H @@ -145,7 +145,6 @@ void channel_free_all(void); void channel_stop_listening(void); void channel_send_open(int); -void channel_request(int, char *, int); void channel_request_start(int, char *, int); void channel_register_cleanup(int, channel_callback_fn *); void channel_register_confirm(int, channel_callback_fn *); diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 5aec17c6d12..1e9d2c8070b 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.160 2002/02/03 17:58:21 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.161 2002/02/05 14:32:55 markus Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -1090,7 +1090,8 @@ ssh_session2_setup(int id, void *arg) packet_put_string(buffer_ptr(&command), buffer_len(&command)); packet_send(); } else { - channel_request(id, "shell", 0); + channel_request_start(id, "shell", 0); + packet_send(); } /* channel_callback(id, SSH2_MSG_OPEN_CONFIGMATION, client_init, 0); */ |