summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--win/tclWinSock.c23
2 files changed, 24 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 297a312..022b795 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,14 @@
+2001-12-13 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * win/tclWinSock.c (TcpGetOptionProc): Fix for tcl bug item
+ #478565 reported by an unknown person. Bypasses all calls to
+ "gethostbyaddr" for address "0.0.0.0" to prevent delays on
+ Win/NT.
+
2001-12-12 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* generic/tclIO.c (Tcl_GetsObj): Applied patch for bug #491341 as
- provided by Don Porter <dgp@users.sourceforge.net>. Fixes
+ provided by Don Porter <dgp@users.sourceforge.net>. Fixes the
assumption of having an empty Tcl_Obj to work with.
2001-12-11 Miguel Sofer <msofer@users.sourceforge.net>
@@ -15,12 +22,8 @@
INST_LIST_INDEX_MULTI and INST_LSET_FLAT, so this has no effect
on bytecodes generated up to tcl8.4a3 inclusive.
-2001-12-11 Miguel Sofer <msofer@users.sourceforge.net>
-
* generic/tclExecute.c: fix debug messages in INST_LSET_LIST.
-2001-12-11 Miguel Sofer <msofer@users.sourceforge.net>
-
* generic/tclCompCmds.c (TclCompileLindexCmd):
* generic/tclCompExpr.c (CompileMathFuncCall): removed the last
two overestimates of the necessary stack depth for bytecodes in
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 42f647b..d68b4a2 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.21 2001/09/20 18:33:37 hobbs Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.22 2001/12/13 18:07:13 andreas_kupries Exp $
*/
#include "tclWinInt.h"
@@ -1946,9 +1946,14 @@ TcpGetOptionProc(instanceData, interp, optionName, dsPtr)
}
Tcl_DStringAppendElement(dsPtr,
(*winSock.inet_ntoa)(peername.sin_addr));
- hostEntPtr = (*winSock.gethostbyaddr)(
- (char *) &(peername.sin_addr), sizeof(peername.sin_addr),
- AF_INET);
+
+ if (peername.sin_addr.s_addr == 0) {
+ hostEntPtr = (struct hostent *) NULL;
+ } else {
+ hostEntPtr = (*winSock.gethostbyaddr)(
+ (char *) &(peername.sin_addr), sizeof(peername.sin_addr),
+ AF_INET);
+ }
if (hostEntPtr != (struct hostent *) NULL) {
Tcl_DStringAppendElement(dsPtr, hostEntPtr->h_name);
} else {
@@ -1992,9 +1997,13 @@ TcpGetOptionProc(instanceData, interp, optionName, dsPtr)
}
Tcl_DStringAppendElement(dsPtr,
(*winSock.inet_ntoa)(sockname.sin_addr));
- hostEntPtr = (*winSock.gethostbyaddr)(
- (char *) &(sockname.sin_addr), sizeof(peername.sin_addr),
- AF_INET);
+ if (sockname.sin_addr.s_addr == 0) {
+ hostEntPtr = (struct hostent *) NULL;
+ } else {
+ hostEntPtr = (*winSock.gethostbyaddr)(
+ (char *) &(sockname.sin_addr), sizeof(peername.sin_addr),
+ AF_INET);
+ }
if (hostEntPtr != (struct hostent *) NULL) {
Tcl_DStringAppendElement(dsPtr, hostEntPtr->h_name);
} else {