Skip to content
GitLab
Menu
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
73726afd
Commit
73726afd
authored
May 08, 2006
by
Niels Möller
Browse files
Use CAST_SUBTYPE, not CAST, to allow for subclassing.
Rev: src/channel_forward.c:1.14.2.7
parent
6fb9709e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/channel_forward.c
View file @
73726afd
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
static
void
static
void
do_kill_channel_forward
(
struct
resource
*
s
)
do_kill_channel_forward
(
struct
resource
*
s
)
{
{
CAST
(
channel_forward
,
self
,
s
);
CAST
_SUBTYPE
(
channel_forward
,
self
,
s
);
if
(
self
->
super
.
super
.
alive
)
if
(
self
->
super
.
super
.
alive
)
{
{
trace
(
"do_kill_channel_forward
\n
"
);
trace
(
"do_kill_channel_forward
\n
"
);
...
@@ -72,7 +72,7 @@ static void *
...
@@ -72,7 +72,7 @@ static void *
oop_write_socket
(
oop_source
*
source
UNUSED
,
oop_write_socket
(
oop_source
*
source
UNUSED
,
int
fd
,
oop_event
event
,
void
*
state
)
int
fd
,
oop_event
event
,
void
*
state
)
{
{
CAST
(
channel_forward
,
self
,
(
struct
lsh_object
*
)
state
);
CAST
_SUBTYPE
(
channel_forward
,
self
,
(
struct
lsh_object
*
)
state
);
assert
(
event
==
OOP_WRITE
);
assert
(
event
==
OOP_WRITE
);
assert
(
fd
==
self
->
write
.
fd
);
assert
(
fd
==
self
->
write
.
fd
);
...
@@ -103,7 +103,7 @@ static void *
...
@@ -103,7 +103,7 @@ static void *
oop_read_socket
(
oop_source
*
source
UNUSED
,
oop_read_socket
(
oop_source
*
source
UNUSED
,
int
fd
,
oop_event
event
,
void
*
state
)
int
fd
,
oop_event
event
,
void
*
state
)
{
{
CAST
(
channel_forward
,
self
,
(
struct
lsh_object
*
)
state
);
CAST
_SUBTYPE
(
channel_forward
,
self
,
(
struct
lsh_object
*
)
state
);
uint32_t
done
;
uint32_t
done
;
assert
(
fd
==
self
->
read
.
fd
);
assert
(
fd
==
self
->
read
.
fd
);
...
@@ -122,7 +122,7 @@ static void
...
@@ -122,7 +122,7 @@ static void
do_channel_forward_send_adjust
(
struct
ssh_channel
*
s
,
do_channel_forward_send_adjust
(
struct
ssh_channel
*
s
,
uint32_t
i
UNUSED
)
uint32_t
i
UNUSED
)
{
{
CAST
(
channel_forward
,
self
,
s
);
CAST
_SUBTYPE
(
channel_forward
,
self
,
s
);
channel_io_start_read
(
&
self
->
super
,
&
self
->
read
,
oop_read_socket
);
channel_io_start_read
(
&
self
->
super
,
&
self
->
read
,
oop_read_socket
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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