]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Refactor ssh.c's APIs to x11fwd.c and portfwd.c.
authorSimon Tatham <anakin@pobox.com>
Sun, 17 Nov 2013 14:04:41 +0000 (14:04 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 17 Nov 2013 14:04:41 +0000 (14:04 +0000)
commit9cbcd176516db51658a55bfc8a37bd00938a70f0
tree60fa65cb8db011efc6c8037778236852e3e85c64
parent489590cbd434facbb800e66a78a840f185ed7496
Refactor ssh.c's APIs to x11fwd.c and portfwd.c.

The most important change is that, where previously ssh.c held the
Socket pointer for each X11 and port forwarding, and the support
modules would find their internal state structure by calling
sk_get_private_ptr on that Socket, it's now the other way round. ssh.c
now directly holds the internal state structure pointer for each
forwarding, and when the support module needs the Socket it looks it
up in a field of that. This will come in handy when I decouple socket
creation from logical forwarding setup, so that X forwardings can
delay actually opening a connection to an X server until they look at
the authentication data and see which server it has to be.

However, while I'm here, I've also taken the opportunity to clean up a
few other points, notably error message handling, and also the fact
that the same kind of state structure was used for both
connection-type and listening-type port forwardings. Now there are
separate PortForwarding and PortListener structure types, which seems
far more sensible.

[originally from svn r10074]
portfwd.c
ssh.c
ssh.h
x11fwd.c