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

metze at samba.org metze at samba.org
Tue Jul 25 08:00:31 GMT 2006


Author: metze
Date: 2006-07-25 08:00:30 +0000 (Tue, 25 Jul 2006)
New Revision: 17227

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

Log:
don't call a function which takes some nonoptional args
with NULL.

metze
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	2006-07-25 07:48:23 UTC (rev 17226)
+++ branches/SAMBA_4_0/source/smbd/service_stream.c	2006-07-25 08:00:30 UTC (rev 17227)
@@ -81,12 +81,8 @@
 /*
   the select loop has indicated that a stream is ready for IO
 */
-static void stream_io_handler(struct event_context *ev, struct fd_event *fde, 
-			      uint16_t flags, void *private)
+static void stream_io_handler(struct stream_connection *conn, uint16_t flags)
 {
-	struct stream_connection *conn = talloc_get_type(private, 
-							 struct stream_connection);
-
 	conn->processing = True;
 	if (flags & EVENT_FD_WRITE) {
 		conn->ops->send_handler(conn, flags);
@@ -100,11 +96,21 @@
 	}
 }
 
-void stream_io_handler_callback(void *conn, uint16_t flags) 
+static void stream_io_handler_fde(struct event_context *ev, struct fd_event *fde, 
+				  uint16_t flags, void *private)
 {
-	stream_io_handler(NULL, NULL, flags, conn);
+	struct stream_connection *conn = talloc_get_type(private, 
+							 struct stream_connection);
+	stream_io_handler(conn, flags);
 }
 
+void stream_io_handler_callback(void *private, uint16_t flags) 
+{
+	struct stream_connection *conn = talloc_get_type(private, 
+							 struct stream_connection);
+	stream_io_handler(conn, flags);
+}
+
 /*
   this creates a stream_connection from an already existing connection,
   used for protocols, where a client connection needs to switched into
@@ -134,7 +140,7 @@
 	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, srv_conn);
+					       stream_io_handler_fde, srv_conn);
 	*_srv_conn = srv_conn;
 	return NT_STATUS_OK;
 }
@@ -167,7 +173,7 @@
 	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, srv_conn);
+					       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");



More information about the samba-cvs mailing list