From 55d4d36993293fee914a009f1d8f05810e347f2b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 30 Jan 2005 00:54:57 +0000 Subject: r5102: This is a major simplification of the logic for controlling top level servers in smbd. The old code still contained a fairly bit of legacy from the time when smbd was only handling SMB connection. The new code gets rid of all of the smb_server specific code in smbd/, and creates a much simpler infrastructures for new server code. Major changes include: - simplified the process model code a lot. - got rid of the top level server and service structures completely. The top level context is now the event_context. This got rid of service.h and server.h completely (they were the most confusing parts of the old code) - added service_stream.[ch] for the helper functions that are specific to stream type services (services that handle streams, and use a logically separate process per connection) - got rid of the builtin idle_handler code in the service logic, as none of the servers were using it, and it can easily be handled by a server in future by adding its own timed_event to the event context. - fixed some major memory leaks in the rpc server code. - added registration of servers, rather than hard coding our list of possible servers. This allows for servers as modules in the future. - temporarily disabled the winbind code until I add the helper functions for that type of server - added error checking on service startup. If a configured server fails to startup then smbd doesn't startup. - cleaned up the command line handling in smbd, removing unused options (This used to be commit cf6a46c3cbde7b1eb1b86bd3882b953a2de3a42e) --- source4/ntvfs/cifs/vfs_cifs.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'source4/ntvfs/cifs/vfs_cifs.c') diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 7ac687dd46..13b11d8ba2 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -30,6 +30,7 @@ #include "libcli/raw/libcliraw.h" #include "libcli/composite/composite.h" #include "smb_server/smb_server.h" +#include "smbd/service_stream.h" /* this is stored in ntvfs_private */ struct cvfs_private { @@ -48,22 +49,6 @@ struct async_info { #define SETUP_PID private->tree->session->pid = SVAL(req->in.hdr, HDR_PID) -/* - an idle function to cope with messages from the smbd client while - waiting for a reply from the server - this function won't be needed once all of the cifs backend - and the core of smbd is converted to use async calls -*/ -static void idle_func(struct smbcli_transport *transport, void *p_private) -{ - struct cvfs_private *private = p_private; - int fd = socket_get_fd(private->tcon->smb_conn->connection->socket); - - if (socket_pending(fd)) { - smbd_process_async(private->tcon->smb_conn); - } -} - /* a handler for oplock break events from the server - these need to be passed along to the client @@ -158,7 +143,6 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, /* we need to receive oplock break requests from the server */ smbcli_oplock_handler(private->transport, oplock_handler, private); - smbcli_transport_idle_handler(private->transport, idle_func, 50000, private); private->transport->socket->event.fde->handler = cifs_socket_handler; private->transport->socket->event.fde->private = private; -- cgit