diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-01-10 10:52:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:37:23 -0500 |
commit | 1cd4339b9a2786aa26691ca4f02fa93ab0958b88 (patch) | |
tree | 9b09324617e38a651de0a761b3c591fa7deff74a /source4/smbd/process_single.c | |
parent | 848e236516ccc15864f7c3d2e05a905f6a81678e (diff) | |
download | samba-1cd4339b9a2786aa26691ca4f02fa93ab0958b88.tar.gz samba-1cd4339b9a2786aa26691ca4f02fa93ab0958b88.tar.bz2 samba-1cd4339b9a2786aa26691ca4f02fa93ab0958b88.zip |
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)
Diffstat (limited to 'source4/smbd/process_single.c')
-rw-r--r-- | source4/smbd/process_single.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); } |