diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-01-13 19:14:10 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-01-13 19:14:10 +0000 |
commit | 80417d9af782f1d5b4fe81379ddaa55ca87532aa (patch) | |
tree | f382a7b877be72715798b08ec7eb7d5dcd1ee848 /usr.bin | |
parent | 4c3ae8c54e35c796446ef3ab7fa045582f0c9e47 (diff) |
move callback to headerfile
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/clientloop.c | 7 | ||||
-rw-r--r-- | usr.bin/ssh/clientloop.h | 24 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.c | 7 |
3 files changed, 31 insertions, 7 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 44a79d0e08d..9079bcda8b6 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -59,7 +59,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: clientloop.c,v 1.42 2000/12/19 23:17:56 markus Exp $"); +RCSID("$OpenBSD: clientloop.c,v 1.43 2001/01/13 19:14:08 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -79,6 +79,7 @@ RCSID("$OpenBSD: clientloop.c,v 1.42 2000/12/19 23:17:56 markus Exp $"); #include <openssl/rsa.h> #include "key.h" #include "authfd.h" +#include "clientloop.h" /* import options */ extern Options options; @@ -1247,9 +1248,9 @@ client_input_channel_req(int id, void *arg) } void -client_set_session_ident(int id) +clientloop_set_session_ident(int id) { - debug2("client_set_session_ident: id %d", id); + debug2("clientloop_set_session_ident: id %d", id); session_ident = id; channel_register_callback(id, SSH2_MSG_CHANNEL_REQUEST, client_input_channel_req, (void *)0); diff --git a/usr.bin/ssh/clientloop.h b/usr.bin/ssh/clientloop.h new file mode 100644 index 00000000000..3ad72aa55ce --- /dev/null +++ b/usr.bin/ssh/clientloop.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2001 Markus Friedl. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +void clientloop_set_session_ident(int id); diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 41af8bedf9d..0f7352df195 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.80 2001/01/13 18:32:50 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.81 2001/01/13 19:14:09 markus Exp $"); #include <openssl/evp.h> #include <openssl/dsa.h> @@ -59,6 +59,7 @@ RCSID("$OpenBSD: ssh.c,v 1.80 2001/01/13 18:32:50 markus Exp $"); #include "key.h" #include "authfd.h" #include "authfile.h" +#include "clientloop.h" extern char *__progname; @@ -889,8 +890,6 @@ ssh_session(void) return client_loop(have_tty, tty_flag ? options.escape_char : -1, 0); } -extern void client_set_session_ident(int id); - void ssh_session2_callback(int id, void *arg) { @@ -957,7 +956,7 @@ ssh_session2_callback(int id, void *arg) done: /* register different callback, etc. XXX */ packet_set_interactive(interactive); - client_set_session_ident(id); + clientloop_set_session_ident(id); } int |