diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-10-26 13:59:28 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-10-26 13:59:28 (GMT) |
commit | 408495bbff42d176d340658977bf1942b11495cf (patch) | |
tree | 159042abe433413100aba85a667c90140def1d07 /win/tclWinSock.c | |
parent | 74c67fdfe6a0ffd668bac120a258b398bd2feb97 (diff) | |
download | tcl-408495bbff42d176d340658977bf1942b11495cf.zip tcl-408495bbff42d176d340658977bf1942b11495cf.tar.gz tcl-408495bbff42d176d340658977bf1942b11495cf.tar.bz2 |
* unix/tclUnixSock.c (TcpGetOptionProc): Prevent crash if interp is
* win/tclWinSock.c (TcpGetOptionProc): NULL (a legal situation).
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r-- | win/tclWinSock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 7f3dbac..347aa1c 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.78 2010/10/26 13:14:09 rmax Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.79 2010/10/26 13:59:28 dkf Exp $ * * ----------------------------------------------------------------------- * @@ -2079,6 +2079,7 @@ TcpGetOptionProc( SOCKET sock; size_t len = 0; int reverseDNS = 0; +#define SUPPRESS_RDNS_VAR "::tcl::unsupported::noReverseDNS" /* * Check that WinSock is initialized; do not call it if not, to prevent @@ -2118,7 +2119,7 @@ TcpGetOptionProc( return TCL_OK; } - if (Tcl_GetVar(interp, "::tcl::unsupported::noReverseDNS", 0) != NULL) { + if (interp != NULL && Tcl_GetVar(interp, SUPPRESS_RDNS_VAR, 0) != NULL) { reverseDNS = NI_NUMERICHOST; } |