1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Move the default Channel methods into sshcommon.c.

Those don't need any of ssh.c's internal facilities either.
This commit is contained in:
Simon Tatham 2018-09-19 20:32:27 +01:00
parent 64f95e6334
commit 783f03d5ed
2 changed files with 19 additions and 15 deletions

15
ssh.c
View File

@ -1342,21 +1342,6 @@ static void ssh_process_user_input(void *ctx)
ssh->current_user_input_fn(ssh);
}
void chan_remotely_opened_confirmation(Channel *chan)
{
assert(0 && "this channel type should never receive OPEN_CONFIRMATION");
}
void chan_remotely_opened_failure(Channel *chan, const char *errtext)
{
assert(0 && "this channel type should never receive OPEN_FAILURE");
}
int chan_no_eager_close(Channel *chan, int sent_local_eof, int rcvd_remote_eof)
{
return FALSE; /* default: never proactively ask for a close */
}
static int ssh_do_close(Ssh ssh, int notify_exit)
{
int ret = 0;

View File

@ -267,3 +267,22 @@ static int zombiechan_want_close(Channel *chan, int sent_eof, int rcvd_eof)
return TRUE;
}
/* ----------------------------------------------------------------------
* Centralised standard methods for other channel implementations to
* borrow.
*/
void chan_remotely_opened_confirmation(Channel *chan)
{
assert(0 && "this channel type should never receive OPEN_CONFIRMATION");
}
void chan_remotely_opened_failure(Channel *chan, const char *errtext)
{
assert(0 && "this channel type should never receive OPEN_FAILURE");
}
int chan_no_eager_close(Channel *chan, int sent_local_eof, int rcvd_remote_eof)
{
return FALSE; /* default: never proactively ask for a close */
}