mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 22:12:47 -05:00
Give BPPs a Frontend, so they can do their own logging.
The sshverstring quasi-frontend is passed a Frontend pointer at setup time, so that it can generate Event Log entries containing the local and remote version strings and the results of remote bug detection. I'm promoting that field of sshverstring to a field of the public BPP structure, so now all BPPs have the right to talk directly to the frontend if they want to. This means I can move all the log messages of the form 'Initialised so-and-so cipher/MAC/compression' down into the BPPs themselves, where they can live exactly alongside the actual initialisation of those primitives. It also means BPPs will be able to log interesting things they detect at any point in the packet stream, which is about to come in useful for another purpose.
This commit is contained in:
6
ssh.c
6
ssh.c
@ -172,7 +172,7 @@ static void ssh_got_ssh_version(struct ssh_version_receiver *rcv,
|
||||
int is_simple =
|
||||
(conf_get_int(ssh->conf, CONF_ssh_simple) && !ssh->connshare);
|
||||
|
||||
ssh->bpp = ssh2_bpp_new(&ssh->stats);
|
||||
ssh->bpp = ssh2_bpp_new(ssh->frontend, &ssh->stats);
|
||||
ssh_connect_bpp(ssh);
|
||||
|
||||
#ifndef NO_GSSAPI
|
||||
@ -247,7 +247,7 @@ static void ssh_got_ssh_version(struct ssh_version_receiver *rcv,
|
||||
|
||||
} else {
|
||||
|
||||
ssh->bpp = ssh1_bpp_new();
|
||||
ssh->bpp = ssh1_bpp_new(ssh->frontend);
|
||||
ssh_connect_bpp(ssh);
|
||||
|
||||
connection_layer = ssh1_connection_new(ssh, ssh->conf, &ssh->cl);
|
||||
@ -260,7 +260,7 @@ static void ssh_got_ssh_version(struct ssh_version_receiver *rcv,
|
||||
}
|
||||
|
||||
} else {
|
||||
ssh->bpp = ssh2_bare_bpp_new();
|
||||
ssh->bpp = ssh2_bare_bpp_new(ssh->frontend);
|
||||
ssh_connect_bpp(ssh);
|
||||
|
||||
connection_layer = ssh2_connection_new(
|
||||
|
Reference in New Issue
Block a user