diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-10 13:56:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-10 13:56:10 (GMT) |
commit | 087ee7ed0d134cda28132343b258eee2afc60261 (patch) | |
tree | 1061d9a2d7d65b1c23cfa06188dc5fd2e6a3c5be /win | |
parent | fc84850b75bc0741998145b52bbe2269c2d76e8d (diff) | |
download | tcl-087ee7ed0d134cda28132343b258eee2afc60261.zip tcl-087ee7ed0d134cda28132343b258eee2afc60261.tar.gz tcl-087ee7ed0d134cda28132343b258eee2afc60261.tar.bz2 |
Experimental follow-up: Change internal TclCreateSocketAddress() signature, from using "int port" to "const char *service".
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinSock.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 5e0d7c8..b2d77a1 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -1902,6 +1902,11 @@ Tcl_OpenTcpClient( const char *errorMsg = NULL; struct addrinfo *addrlist = NULL, *myaddrlist = NULL; char channelName[SOCK_CHAN_LENGTH]; + char service[TCL_INTEGER_SPACE], myservice[TCL_INTEGER_SPACE]; + + TclFormatInt(service, port); + TclFormatInt(myservice, myport); + if (TclpHasSockets(interp) != TCL_OK) { return NULL; @@ -1921,8 +1926,8 @@ Tcl_OpenTcpClient( * Do the name lookups for the local and remote addresses. */ - if (!TclCreateSocketAddress(interp, &addrlist, host, port, 0, &errorMsg) - || !TclCreateSocketAddress(interp, &myaddrlist, myaddr, myport, 1, + if (!TclCreateSocketAddress(interp, &addrlist, host, service, 0, &errorMsg) + || !TclCreateSocketAddress(interp, &myaddrlist, myaddr, myservice, 1, &errorMsg)) { if (addrlist != NULL) { freeaddrinfo(addrlist); @@ -2078,7 +2083,7 @@ Tcl_OpenTcpServerEx( goto error; } - if (!TclCreateSocketAddress(interp, &addrlist, myHost, port, 1, &errorMsg)) { + if (!TclCreateSocketAddress(interp, &addrlist, myHost, service, 1, &errorMsg)) { goto error; } |