summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-25 08:00:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:10:22 -0500
commit8a3f6a7912bb86ccb2a60da7016042a6f5bf3c86 (patch)
treea9c40a044d9a820ca4f5d425caff1eef845cb770 /source4
parent79f7b58630e996ec734acb10e1fb99991979fe1b (diff)
downloadsamba-8a3f6a7912bb86ccb2a60da7016042a6f5bf3c86.tar.gz
samba-8a3f6a7912bb86ccb2a60da7016042a6f5bf3c86.tar.bz2
samba-8a3f6a7912bb86ccb2a60da7016042a6f5bf3c86.zip
r17227: don't call a function which takes some nonoptional args
with NULL. metze (This used to be commit 3711b968adf8a0951171ad1a90be65a9ae0dc03b)
Diffstat (limited to 'source4')
-rw-r--r--source4/smbd/service_stream.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index d238fc4128..517a40a40c 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -81,12 +81,8 @@ void stream_terminate_connection(struct stream_connection *srv_conn, const char
/*
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,9 +96,19 @@ static void stream_io_handler(struct event_context *ev, struct fd_event *fde,
}
}
-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);
}
/*
@@ -134,7 +140,7 @@ NTSTATUS stream_new_connection_merge(struct event_context *ev,
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 @@ static void stream_new_connection(struct event_context *ev,
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");