diff options
author | andreas_kupries <akupries@shaw.ca> | 2002-02-26 02:49:49 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2002-02-26 02:49:49 (GMT) |
commit | d181088ff738547a9a7dce8decab6c860a4b9664 (patch) | |
tree | 7ad1808b6946ad108c891f33adb77499c922d96d /mac | |
parent | a250b602bbacce9038f853923b404d201515d375 (diff) | |
download | tcl-d181088ff738547a9a7dce8decab6c860a4b9664.zip tcl-d181088ff738547a9a7dce8decab6c860a4b9664.tar.gz tcl-d181088ff738547a9a7dce8decab6c860a4b9664.tar.bz2 |
* mac/tclMacSock.c (TcpGetOptionProc): Changed to recognize the
option "-error". Essentially ignores the option, always
returning an empty string.
Diffstat (limited to 'mac')
-rw-r--r-- | mac/tclMacSock.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/mac/tclMacSock.c b/mac/tclMacSock.c index 70380b1..f3cdaf4 100644 --- a/mac/tclMacSock.c +++ b/mac/tclMacSock.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: tclMacSock.c,v 1.12 2002/01/27 11:10:07 das Exp $ + * RCS: @(#) $Id: tclMacSock.c,v 1.13 2002/02/26 02:49:50 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1354,7 +1354,7 @@ TcpGetOptionProc( * value; initialized by caller. */ { TcpState *statePtr = (TcpState *) instanceData; - int doPeerName = false, doSockName = false, doAll = false; + int doPeerName = false, doSockName = false, doError = false, doAll = false; ip_addr tcpAddress; char buffer[128]; OSErr err; @@ -1392,9 +1392,33 @@ TcpGetOptionProc( doPeerName = true; } else if (!strcmp(optionName, "-sockname")) { doSockName = true; + } else if (!strcmp(optionName, "-error")) { + /* SF Bug #483575 */ + doError = true; } else { return Tcl_BadChannelOption(interp, optionName, - "peername sockname"); + "error peername sockname"); + } + } + + /* + * SF Bug #483575 + * + * Return error information. Currently we ignore + * this option. IOW, we always return the empty + * string, signaling 'no error'. + * + * FIXME: Get a mac/socket expert to write a correct + * FIXME: implementation. + */ + + if (doAll || doError) { + if (doAll) { + Tcl_DStringAppendElement(dsPtr, "-error"); + Tcl_DStringAppendElement(dsPtr, ""); + } else { + Tcl_DStringAppend (dsPtr, ""); + return TCL_OK; } } |