Author: tridge Date: 2007-07-04 07:45:41 +0000 (Wed, 04 Jul 2007) New Revision: 23702
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23702 Log: fixed a "falling back to select" error in the standard process model. It's much cleaner to get the event system to close the fd, especially with the complexity of forks Modified: branches/SAMBA_4_0/source/smbd/service_stream.c Changeset: Modified: branches/SAMBA_4_0/source/smbd/service_stream.c =================================================================== --- branches/SAMBA_4_0/source/smbd/service_stream.c 2007-07-04 07:43:26 UTC (rev 23701) +++ branches/SAMBA_4_0/source/smbd/service_stream.c 2007-07-04 07:45:41 UTC (rev 23702) @@ -289,9 +289,13 @@ return status; } + /* we will close the socket using the events system */ + socket_set_flags(stream_socket->sock, SOCKET_FLAG_NOCLOSE); + event_add_fd(event_context, stream_socket->sock, socket_get_fd(stream_socket->sock), - EVENT_FD_READ, stream_accept_handler, stream_socket); + EVENT_FD_READ|EVENT_FD_AUTOCLOSE, + stream_accept_handler, stream_socket); stream_socket->private = talloc_reference(stream_socket, private); stream_socket->ops = stream_ops;
