]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commit - unix/uxnet.c
Move out of the SockAddr structure the mutable fields "ai" and
authorSimon Tatham <anakin@pobox.com>
Sat, 8 Nov 2008 16:45:45 +0000 (16:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 8 Nov 2008 16:45:45 +0000 (16:45 +0000)
commit9c00c74583da81e28156d36c3fc3b5ea08961828
tree019e7397db89f94de19fedd4c1f42412034553eb
parent52e8d758e7f74c8fcf2bcc2856b5e684a8fd069d
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.

git-svn-id: http://svn.tartarus.org/sgt/putty@8293 cda61777-01e9-0310-a592-d414129be87e
unix/uxnet.c
windows/winnet.c