svn commit: samba r24276 - in branches/SAMBA_4_0/source/smbd: .

tridge at samba.org tridge at samba.org
Wed Aug 8 03:20:37 GMT 2007


Author: tridge
Date: 2007-08-08 03:20:37 +0000 (Wed, 08 Aug 2007)
New Revision: 24276

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24276

Log:

don't mark a stream readable until after the messaging setup is
complete. This is needed because messaging setup with ctdb involve
events, and we don't want a SMB packet to be processed on this stream
until after the stream structure is fully setup

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-08-08 03:19:38 UTC (rev 24275)
+++ branches/SAMBA_4_0/source/smbd/service_stream.c	2007-08-08 03:20:37 UTC (rev 24276)
@@ -172,8 +172,7 @@
 	srv_conn->ops           = stream_socket->ops;
 	srv_conn->event.ctx	= ev;
 	srv_conn->event.fde	= event_add_fd(ev, srv_conn, socket_get_fd(sock),
-					       EVENT_FD_READ, 
-					       stream_io_handler_fde, srv_conn);
+					       0, stream_io_handler_fde, srv_conn);
 
 	if (!socket_check_access(sock, "smbd", lp_hostsallow(-1), lp_hostsdeny(-1))) {
 		stream_terminate_connection(srv_conn, "denied by access rules");
@@ -202,6 +201,9 @@
 	talloc_free(c);
 	talloc_free(s);
 
+	/* we're now ready to start receiving events on this stream */
+	EVENT_FD_READABLE(srv_conn->event.fde);
+
 	/* call the server specific accept code */
 	stream_socket->ops->accept_connection(srv_conn);
 }



More information about the samba-cvs mailing list