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
b21fd8af
Commit
b21fd8af
authored
Feb 05, 2000
by
Niels Möller
Browse files
* src/client.c: Replaced io_fd with lsh_fd.
Rev: src/client.c:1.84 Rev: src/client.h:1.27
parent
aea7bf3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/client.c
View file @
b21fd8af
...
...
@@ -185,9 +185,9 @@ struct command *make_request_service(int service)
(requests object request_info)
; To access stdio
(in object
io
_fd)
(out object
io
_fd)
(err object
io
_fd)
(in object
lsh
_fd)
(out object
lsh
_fd)
(err object
lsh
_fd)
; Where to save the exit code.
(exit_status simple "int *")))
...
...
@@ -199,10 +199,10 @@ do_client_session_eof(struct ssh_channel *c)
{
CAST
(
client_session
,
session
,
c
);
close_fd
(
&
session
->
in
->
super
,
0
);
close_fd
(
session
->
in
,
0
);
#if 0
close_fd(
&
session->out
->super
, 0);
close_fd(
&
session->err
->super
, 0);
close_fd(session->out, 0);
close_fd(session->err, 0);
#endif
}
...
...
@@ -354,9 +354,9 @@ do_send(struct ssh_channel *s,
{
CAST
(
client_session
,
self
,
s
);
assert
(
self
->
in
->
super
.
read
);
assert
(
self
->
in
->
read
);
self
->
in
->
super
.
want_read
=
1
;
self
->
in
->
want_read
=
1
;
}
/* We have a remote shell */
...
...
@@ -379,35 +379,35 @@ do_client_io(struct command *s UNUSED,
* exception handlers here; it would be better to create the
* fd-objects at a point where the right exception handlers can be
* installed from the start. */
session
->
out
->
super
.
e
session
->
out
->
e
=
make_channel_io_exception_handler
(
channel
,
"lsh: I/O error on stdout"
,
session
->
out
->
super
.
e
,
session
->
out
->
e
,
HANDLER_CONTEXT
);
session
->
err
->
super
.
e
session
->
err
->
e
=
make_channel_io_exception_handler
(
channel
,
"lsh: I/O error on stderr"
,
session
->
err
->
super
.
e
,
session
->
err
->
e
,
HANDLER_CONTEXT
);
/* Set up the fd we read from. */
channel
->
send
=
do_send
;
session
->
in
->
super
.
read
=
make_channel_read_data
(
channel
);
session
->
in
->
read
=
make_channel_read_data
(
channel
);
/* FIXME: Perhaps there is some way to arrange that channel.c calls
* the CHANNEL_SEND method instead? */
if
(
session
->
super
.
send_window_size
)
session
->
in
->
super
.
want_read
=
1
;
session
->
in
->
want_read
=
1
;
session
->
in
->
super
.
close_callback
session
->
in
->
close_callback
=
make_channel_read_close_callback
(
channel
);
/* Make sure stdio is closed properly if the channel or connection dies */
REMEMBER_RESOURCE
(
channel
->
resources
,
&
session
->
in
->
super
.
super
);
REMEMBER_RESOURCE
(
channel
->
resources
,
&
session
->
out
->
super
.
super
);
REMEMBER_RESOURCE
(
channel
->
resources
,
&
session
->
err
->
super
.
super
);
REMEMBER_RESOURCE
(
channel
->
resources
,
&
session
->
in
->
super
);
REMEMBER_RESOURCE
(
channel
->
resources
,
&
session
->
out
->
super
);
REMEMBER_RESOURCE
(
channel
->
resources
,
&
session
->
err
->
super
);
ALIST_SET
(
channel
->
request_types
,
ATOM_EXIT_STATUS
,
make_handle_exit_status
(
session
->
exit_status
));
...
...
@@ -423,9 +423,9 @@ struct command client_io =
{
STATIC_HEADER
,
do_client_io
};
struct
ssh_channel
*
make_client_session
(
struct
io
_fd
*
in
,
struct
io
_fd
*
out
,
struct
io
_fd
*
err
,
struct
ssh_channel
*
make_client_session
(
struct
lsh
_fd
*
in
,
struct
lsh
_fd
*
out
,
struct
lsh
_fd
*
err
,
UINT32
max_window
,
int
*
exit_status
)
{
...
...
src/client.h
View file @
b21fd8af
...
...
@@ -62,9 +62,9 @@ extern struct channel_request_command request_shell;
extern
struct
command
client_io
;
#define CLIENT_START_IO (&client_io.super)
struct
ssh_channel
*
make_client_session
(
struct
io
_fd
*
in
,
struct
io
_fd
*
out
,
struct
io
_fd
*
err
,
struct
ssh_channel
*
make_client_session
(
struct
lsh
_fd
*
in
,
struct
lsh
_fd
*
out
,
struct
lsh
_fd
*
err
,
UINT32
max_window
,
int
*
exit_status
);
...
...
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