summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlimeboy <that.lemon+tcl@gmai.com>2016-12-20 10:22:22 (GMT)
committerlimeboy <that.lemon+tcl@gmai.com>2016-12-20 10:22:22 (GMT)
commitd4daeaf6fdc234980b6b7e28b281185896c2dd11 (patch)
treee711c326870550eb59ec0e69a77bea68bc977566
parentb8271467dc712230e7eecf2818f7232c2ebda8b4 (diff)
downloadtcl-d4daeaf6fdc234980b6b7e28b281185896c2dd11.zip
tcl-d4daeaf6fdc234980b6b7e28b281185896c2dd11.tar.gz
tcl-d4daeaf6fdc234980b6b7e28b281185896c2dd11.tar.bz2
Correct the handling of -server and its options.
-rw-r--r--generic/tclIOCmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 0eb8f99..fb37ff6 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -1493,7 +1493,7 @@ Tcl_SocketObjCmd(
SKT_SERVER
};
int optionIndex, a, server = 0, myport = 0, async = 0, boolTmp;
- unsigned int flags = TCL_TCPSERVER_REUSEADDR;
+ unsigned int flags = 0;
const char *host, *port, *myaddr = NULL;
Tcl_Obj *script = NULL;
Tcl_Channel chan;
@@ -1552,6 +1552,7 @@ Tcl_SocketObjCmd(
return TCL_ERROR;
}
server = 1;
+ flags |= TCL_TCPSERVER_REUSEADDR;
a++;
if (a >= objc) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(