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
d3cb4b70
Commit
d3cb4b70
authored
Apr 07, 1999
by
Niels Möller
Browse files
* src/channel.c, src/server.c: Started adapting the functions to
the command framework. Rev: src/channel.c:1.32 Rev: src/server.c:1.54
parent
6a5c7e7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/channel.c
View file @
d3cb4b70
...
...
@@ -27,7 +27,6 @@
#include
"format.h"
#include
"io.h"
#include
"read_data.h"
#include
"service.h"
#include
"ssh.h"
#include
"werror.h"
#include
"xalloc.h"
...
...
@@ -44,7 +43,7 @@
/* GABA:
(class
(name connection_service)
(super
ssh_service
)
(super
command
)
(vars
; Supported global requests
(global_requests object alist)
...
...
@@ -1006,10 +1005,12 @@ static int do_channel_failure(struct packet_handler *closure UNUSED,
return
LSH_FAIL
|
LSH_DIE
;
}
static
int
init_connection_service
(
struct
ssh_service
*
s
,
struct
ssh_connection
*
connection
)
static
int
do_connection_service
(
struct
command
*
s
,
struct
lsh_object
*
x
,
struct
command_continuation
*
c
)
{
CAST
(
connection_service
,
self
,
s
);
CAST
(
ssh_connection
,
connection
,
x
);
struct
channel_table
*
table
;
...
...
@@ -1077,13 +1078,13 @@ static int init_connection_service(struct ssh_service *s,
:
LSH_OK
|
LSH_GOON
;
}
struct
ssh_service
*
make_connection_service
(
struct
alist
*
global_requests
,
struct
alist
*
channel_types
,
struct
connection_startup
*
start
)
struct
command
*
make_connection_service
(
struct
alist
*
global_requests
,
struct
alist
*
channel_types
,
struct
connection_startup
*
start
)
{
NEW
(
connection_service
,
self
);
self
->
super
.
init
=
init
_connection_service
;
self
->
super
.
call
=
do
_connection_service
;
self
->
global_requests
=
global_requests
;
self
->
channel_types
=
channel_types
;
self
->
start
=
start
;
...
...
src/server.c
View file @
d3cb4b70
...
...
@@ -35,6 +35,7 @@
#include
"read_packet.h"
#include
"reaper.h"
#include
"server_pty.h"
#include
"service.h"
#include
"ssh.h"
#include
"tcpforward.h"
#include
"translate_signal.h"
...
...
@@ -431,10 +432,11 @@ struct channel_open *make_open_session(struct unix_user *user,
return
&
closure
->
super
;
}
/* A command taking two arguments: unix_user, connection */
/* GABA:
(class
(name server_connection_service)
(super
unix_service
)
(super
command
)
(vars
(global_requests object alist)
...
...
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