From 1cd4339b9a2786aa26691ca4f02fa93ab0958b88 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Jan 2007 10:52:09 +0000 Subject: r20646: first preparations for cluster enablement. This changes " uint32_t server_id to struct server_id server_id; which allows a server ID to have an node number. The node number will be zero in non-clustered case. This is the most basic hook needed for clustering, and ctdb. (This used to be commit 2365abaa991d57d68c6ebe9be608e01c907102eb) --- source4/smbd/process_standard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/smbd/process_standard.c') diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 0dc9274e21..074d988e1e 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -28,8 +28,8 @@ #include "lib/socket/socket.h" #include "smbd/process_model.h" #include "param/secrets.h" - #include "system/filesys.h" +#include "cluster/cluster.h" #ifdef HAVE_SETPROCTITLE #ifdef HAVE_SETPROCTITLE_H @@ -58,7 +58,7 @@ static void standard_model_init(struct event_context *ev) static void standard_accept_connection(struct event_context *ev, struct socket_context *sock, void (*new_conn)(struct event_context *, struct socket_context *, - uint32_t , void *), + struct server_id , void *), void *private) { NTSTATUS status; @@ -126,7 +126,7 @@ static void standard_accept_connection(struct event_context *ev, talloc_free(s); /* setup this new connection */ - new_conn(ev2, sock2, pid, private); + new_conn(ev2, sock2, cluster_id(pid), private); /* we can't return to the top level here, as that event context is gone, so we now process events in the new event context until there are no @@ -141,7 +141,7 @@ static void standard_accept_connection(struct event_context *ev, called to create a new server task */ static void standard_new_task(struct event_context *ev, - void (*new_task)(struct event_context *, uint32_t , void *), + void (*new_task)(struct event_context *, struct server_id , void *), void *private) { pid_t pid; @@ -179,7 +179,7 @@ static void standard_new_task(struct event_context *ev, setproctitle("task server_id[%d]", pid); /* setup this new connection */ - new_task(ev2, pid, private); + new_task(ev2, cluster_id(pid), private); /* we can't return to the top level here, as that event context is gone, so we now process events in the new event context until there are no -- cgit