]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Minor refactoring: the fields `pktin' and `pktout' in the Ssh
authorSimon Tatham <anakin@pobox.com>
Wed, 24 Nov 2004 18:45:52 +0000 (18:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 24 Nov 2004 18:45:52 +0000 (18:45 +0000)
commit277089b0fbbb7fe8b5330c049be4bafc815c2726
tree0c36efc6114085b7045e008860cd8cdb63483a7f
parent1aa64afc30a3c002d391acfac9aeebbaa709f8d6
Minor refactoring: the fields `pktin' and `pktout' in the Ssh
structure have been retired. Now all Packet structures are
dynamically allocated. Each rdpkt function allocates one, and it's
freed after being used; and the packet construction functions
allocate them too, and they're freed by the send functions.

`pktin' and `pktout' were ugly. They were _morally_ still global
variables; even though they were replicated per SSH session to
comply with the Mac no-globals requirement, they weren't really in
the _spirit_ of `dynamically allocate your data'.

As a side effect of this change, the `pktout_blanks' and
`pktout_nblanks' fields in the Ssh structure have been moved into
the Packet structure.

[originally from svn r4898]
ssh.c