summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
authorrmax <rmax>2010-12-14 17:22:55 (GMT)
committerrmax <rmax>2010-12-14 17:22:55 (GMT)
commit8fbf69efab55ad2cc2c533f0ba55f4c700f102c6 (patch)
tree651c928a7c05b73cc10da462b8298d30a19e1802 /win/tclWinSock.c
parent93ef2ca8ce830fe5a8a6126835ea3f5d269e2e6c (diff)
downloadtcl-8fbf69efab55ad2cc2c533f0ba55f4c700f102c6.zip
tcl-8fbf69efab55ad2cc2c533f0ba55f4c700f102c6.tar.gz
tcl-8fbf69efab55ad2cc2c533f0ba55f4c700f102c6.tar.bz2
* win/tclWinSock.c (CreateSocket): Swap the loops over
* unix/tclUnixSock.c (CreateClientSocket): local and remote addresses, so that the system's address preference for the remote side decides which family gets tried first. Cleanup and clarify some of the comments.
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 5407b47..c7df204 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinSock.c,v 1.80 2010/12/10 15:44:53 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.81 2010/12/14 17:22:55 rmax Exp $
*
* -----------------------------------------------------------------------
*
@@ -1142,10 +1142,10 @@ CreateSocket(
}
}
} else {
- for (myaddrPtr = myaddrlist; myaddrPtr != NULL;
- myaddrPtr = myaddrPtr->ai_next) {
- for (addrPtr = addrlist; addrPtr != NULL;
- addrPtr = addrPtr->ai_next) {
+ for (addrPtr = addrlist; addrPtr != NULL;
+ addrPtr = addrPtr->ai_next) {
+ for (myaddrPtr = myaddrlist; myaddrPtr != NULL;
+ myaddrPtr = myaddrPtr->ai_next) {
/*
* No need to try combinations of local and remote addresses
* of different families.