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/service_stream.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/service_stream.c')
-rw-r--r-- | source4/smbd/service_stream.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index 725a3b5080..f3f3a67e78 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -28,6 +28,7 @@ #include "smbd/service.h" #include "smbd/service_stream.h" #include "lib/messaging/irpc.h" +#include "cluster/cluster.h" /* the range of ports to try for dcerpc over tcp endpoints */ #define SERVER_TCP_LOW_PORT 1024 @@ -134,7 +135,7 @@ NTSTATUS stream_new_connection_merge(struct event_context *ev, srv_conn->private = private_data; srv_conn->model_ops = model_ops; srv_conn->socket = sock; - srv_conn->server_id = 0; + srv_conn->server_id = cluster_id(0); srv_conn->ops = stream_ops; srv_conn->msg_ctx = msg_ctx; srv_conn->event.ctx = ev; @@ -151,7 +152,7 @@ NTSTATUS stream_new_connection_merge(struct event_context *ev, */ static void stream_new_connection(struct event_context *ev, struct socket_context *sock, - uint32_t server_id, void *private) + struct server_id server_id, void *private) { struct stream_socket *stream_socket = talloc_get_type(private, struct stream_socket); struct stream_connection *srv_conn; @@ -191,10 +192,10 @@ static void stream_new_connection(struct event_context *ev, s = socket_get_my_addr(sock, ev); if (s && c) { const char *title; - title = talloc_asprintf(s, "conn[%s] c[%s:%u] s[%s:%u] server_id[%d]", + title = talloc_asprintf(s, "conn[%s] c[%s:%u] s[%s:%u] server_id[%s]", stream_socket->ops->name, c->addr, c->port, s->addr, s->port, - server_id); + cluster_id_string(s, server_id)); if (title) { stream_connection_set_title(srv_conn, title); } |