mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-19 03:51:02 -05:00
Put a layer of abstraction in front of struct ssh_channel.
Clients outside ssh.c - all implementations of Channel - will now not see the ssh_channel data type itself, but only a subobject of the interface type SshChannel. All the sshfwd_* functions have become methods in that interface type's vtable (though, wrapped in the usual kind of macros, the call sites look identical). This paves the way for me to split up the SSH-1 and SSH-2 connection layers and have each one lay out its channel bookkeeping structure as it sees fit; as long as they each provide an implementation of the sshfwd_ method family, the types behind that need not look different. A minor good effect of this is that the sshfwd_ methods are no longer global symbols, so they don't have to be stubbed in Unix Pageant to get it to compile.
This commit is contained in:
4
x11fwd.c
4
x11fwd.c
@ -39,7 +39,7 @@ typedef struct X11Connection {
|
||||
int no_data_sent_to_x_client;
|
||||
char *peer_addr;
|
||||
int peer_port;
|
||||
struct ssh_channel *c; /* channel structure held by ssh.c */
|
||||
SshChannel *c; /* channel structure held by SSH backend */
|
||||
Socket s;
|
||||
|
||||
const Plug_vtable *plugvt;
|
||||
@ -728,7 +728,7 @@ static const struct ChannelVtable X11Connection_channelvt = {
|
||||
* Called to set up the X11Connection structure, though this does not
|
||||
* yet connect to an actual server.
|
||||
*/
|
||||
Channel *x11_new_channel(tree234 *authtree, struct ssh_channel *c,
|
||||
Channel *x11_new_channel(tree234 *authtree, SshChannel *c,
|
||||
const char *peeraddr, int peerport,
|
||||
int connection_sharing_possible)
|
||||
{
|
||||
|
Reference in New Issue
Block a user