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_single.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/smbd/process_single.c') diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index 9604302199..221cfb7807 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -25,6 +25,7 @@ #include "includes.h" #include "smbd/process_model.h" #include "system/filesys.h" +#include "cluster/cluster.h" /* called when the process model is selected @@ -39,7 +40,7 @@ static void single_model_init(struct event_context *ev) static void single_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; @@ -61,18 +62,18 @@ static void single_accept_connection(struct event_context *ev, talloc_steal(private, sock); - new_conn(ev, sock2, socket_get_fd(sock2), private); + new_conn(ev, sock2, cluster_id(socket_get_fd(sock2)), private); } /* called to startup a new task */ static void single_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) { static uint32_t taskid = 0x10000000; - new_task(ev, taskid++, private); + new_task(ev, cluster_id(taskid++), private); } -- cgit