simon-svn: putty: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sat Nov 8 16:45:45 GMT 2008


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       8293
Date:           2008-11-08 16:45:45 +0000 (Sat, 08 Nov 2008)

Log message (13 lines):
Move out of the SockAddr structure the mutable fields "ai" and
"curraddr", and turn "family" into a macro-derived property of the
other fields. The idea is that this renders SockAddrs immutable once
created, which should open up the possibility of duplicating and
reusing one without having to redo the actual DNS lookup.

I _hope_ I haven't broken anything. The new code architecture
contains several rather dubious-looking operations (namely the
arbitrary choice of the first returned address in functions like
sk_getaddr and sk_address_is_local - what if, for instance, a DNS
lookup returned a local and a non-local address?), but I think they
were functionally just as dubious beforehand and all this change has
done is to make them more obviously so to a reader.

Modified files:
U   putty/unix/uxnet.c
U   putty/windows/winnet.c

Links:
http://svn.tartarus.org/sgt/?rev=8293&view=rev
http://svn.tartarus.org/sgt/putty/unix/uxnet.c?rev=8293&r1=8292&r2=8293
http://svn.tartarus.org/sgt/putty/windows/winnet.c?rev=8293&r1=8292&r2=8293



More information about the tartarus-commits mailing list