diff options
| author | max@tclers.tk (Reinhard Max) <max> | 2011-05-11 15:43:06 (GMT) | 
|---|---|---|
| committer | max@tclers.tk (Reinhard Max) <max> | 2011-05-11 15:43:06 (GMT) | 
| commit | 2992fd05e2fecaea7e51e0c3d521669f8dda5a30 (patch) | |
| tree | e7da087c144a91023e9b7d18e18917c0489f3e97 /unix/tclUnixSock.c | |
| parent | 7548dca3b831e695f01c131b8866d58407b7e401 (diff) | |
| download | tcl-2992fd05e2fecaea7e51e0c3d521669f8dda5a30.zip tcl-2992fd05e2fecaea7e51e0c3d521669f8dda5a30.tar.gz tcl-2992fd05e2fecaea7e51e0c3d521669f8dda5a30.tar.bz2  | |
  *  unix/tclUnixSock.c (TcpWatchProc): No need to check for server sockets here, as the generic server code already takes care of that.
  *  tests/socket.test (accept): Add tests to make sure that this remains so.
Diffstat (limited to 'unix/tclUnixSock.c')
| -rw-r--r-- | unix/tclUnixSock.c | 27 | 
1 files changed, 9 insertions, 18 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 35728e1..cb72759 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -785,25 +785,16 @@ TcpWatchProc(  				 * TCL_EXCEPTION. */  {      TcpState *statePtr = (TcpState *) instanceData; +    TcpFdList *fds; -    /* -     * Make sure we don't mess with server sockets since they will never be -     * readable or writable at the Tcl level. This keeps Tcl scripts from -     * interfering with the -accept behavior. -     */ - -    if (!statePtr->acceptProc) { -	TcpFdList *fds; - -	for (fds = statePtr->fds; fds != NULL; fds = fds->next) { -	    if (mask) { -		Tcl_CreateFileHandler(fds->fd, mask, -			(Tcl_FileProc *) Tcl_NotifyChannel, -			(ClientData) statePtr->channel); -	    } else { -		Tcl_DeleteFileHandler(fds->fd); -	    } -	} +    for (fds = statePtr->fds; fds != NULL; fds = fds->next) { +        if (mask) { +            Tcl_CreateFileHandler(fds->fd, mask, +                                  (Tcl_FileProc *) Tcl_NotifyChannel, +                                  (ClientData) statePtr->channel); +        } else { +            Tcl_DeleteFileHandler(fds->fd); +        }      }  }  | 
