diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2010-03-01 15:25:27 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2010-03-01 15:25:27 (GMT) |
commit | 805a9711e6b754e676e2b042a52394d512f094c4 (patch) | |
tree | 51fe879339af23dbbc64daa40f2e21ab54ad8475 | |
parent | f36b6da9afedb7fe742ebd593ca37066d622a53f (diff) | |
download | tcl-805a9711e6b754e676e2b042a52394d512f094c4.zip tcl-805a9711e6b754e676e2b042a52394d512f094c4.tar.gz tcl-805a9711e6b754e676e2b042a52394d512f094c4.tar.bz2 |
Prettify and fix filename in ChangeLog.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | unix/tclUnixChan.c | 13 |
2 files changed, 12 insertions, 7 deletions
@@ -1,8 +1,8 @@ 2010-03-01 Alexandre Ferrieux <ferrieux@users.sourceforge.net> - * unix/tclUnixSock.c: Refrain from a possibly lengthy reverse-DNS - lookup on 0.0.0.0 when calling [fconfigure -sockname] on an - universally-bound (default) server socket. + * unix/tclUnixChan.c: [backported] Refrain from a possibly lengthy + reverse-DNS lookup on 0.0.0.0 when calling [fconfigure -sockname] + on an universally-bound (default) server socket. 2010-02-27 Donal K. Fellows <dkf@users.sf.net> diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 943e924..42fd927 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.93.2.4 2010/03/01 15:14:15 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.93.2.5 2010/03/01 15:25:27 ferrieux Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -2132,16 +2132,21 @@ TcpGetOptionProc( ((len > 1) && (optionName[1] == 's') && (strncmp(optionName, "-sockname", len) == 0))) { if (getsockname(statePtr->fd, (struct sockaddr *) &sockname, - &size) >= 0) { + &size) >= 0) { if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-sockname"); Tcl_DStringStartSublist(dsPtr); } Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); if (sockname.sin_addr.s_addr == INADDR_ANY) { - hostEntPtr = NULL; /* we don't want to resolve INADDR_ANY */ + /* + * We don't want to resolve INADDR_ANY; it can sometimes cause + * problems (and never has a name). + */ + + hostEntPtr = NULL; } else { - hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ + hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ (char *) &sockname.sin_addr, sizeof(sockname.sin_addr), AF_INET); } |