Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
63fe1115
Commit
63fe1115
authored
Oct 31, 2000
by
Niels Möller
Browse files
* src/gateway_commands.c: Hacked some more. Compiles now.
Rev: src/gateway_commands.c:1.2
parent
acd5b14d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gateway_commands.c
View file @
63fe1115
...
...
@@ -22,7 +22,22 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* #include "gateway.h" */
#include
"channel.h"
#include
"connection_commands.h"
#include
"io.h"
#include
"read_packet.h"
#include
"ssh.h"
#include
"werror.h"
#include
"xalloc.h"
#include
"gateway_commands.c.x"
/* FIXME: Same vars as connection_remember_command */
/* (gateway_accept connection listen_value) */
/* GABA:
(class
(name gateway_accept_command)
...
...
@@ -31,6 +46,12 @@
(connection object ssh_connection)))
*/
/* Buffer size when reading from the socket */
#define BUF_SIZE (1<<14)
/* Blocksize when writing */
#define BLOCK_SIZE 2000
static
void
do_gateway_accept
(
struct
command
*
s
,
struct
lsh_object
*
x
,
...
...
@@ -46,11 +67,19 @@ do_gateway_accept(struct command *s,
NULL
,
/* established_continuation */
make_exc_finish_read_handler
(
lv
->
fd
,
e
,
HANDLER_CONTEXT
));
connection
->
raw
=
&
io_read_write
(
lv
->
fd
,
make_buffered_read
(
BUF_SIZE
,
make_read_packet
(
connection
,
&
connection
->
super
)),
self
->
info
->
block_size
,
make_connection_close_handler
(
connection
));
connection
->
raw
=
&
io_read_write
(
lv
->
fd
,
make_buffered_read
(
BUF_SIZE
,
make_read_packet
(
&
connection
->
super
,
connection
)),
BLOCK_SIZE
,
make_connection_close_handler
(
connection
))
->
write_buffer
->
super
;
connection
->
chain
=
self
->
connection
;
connection
->
dispatch
[
SSH_MSG_DEBUG
]
=
&
connection_forward_handler
;
connection
->
dispatch
[
SSH_MSG_IGNORE
]
=
&
connection_forward_handler
;
init_connection_service
(
connection
);
COMMAND_RETURN
(
c
,
connection
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment