From 77f71c1b65358723771354fd9ff1dc418b227ccc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 Feb 2008 17:51:38 +1100 Subject: Rework cluster_id() to take an additional argument, as we need .. to be unique in a prefork process environment. Andrew Bartlett and David Disseldorp (This used to be commit 931994a7f185bbc98924823e9e8cef1011dd0957) --- source4/cluster/local.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/cluster/local.c') diff --git a/source4/cluster/local.c b/source4/cluster/local.c index 539e47d271..96636927f1 100644 --- a/source4/cluster/local.c +++ b/source4/cluster/local.c @@ -31,11 +31,12 @@ /* server a server_id for the local node */ -static struct server_id local_id(struct cluster_ops *ops, uint32_t id) +static struct server_id local_id(struct cluster_ops *ops, uint64_t id, uint32_t id2) { struct server_id server_id; ZERO_STRUCT(server_id); server_id.id = id; + server_id.id2 = id2; return server_id; } @@ -46,7 +47,7 @@ static struct server_id local_id(struct cluster_ops *ops, uint32_t id) static const char *local_id_string(struct cluster_ops *ops, TALLOC_CTX *mem_ctx, struct server_id id) { - return talloc_asprintf(mem_ctx, "%u.%u", id.node, id.id); + return talloc_asprintf(mem_ctx, "%u.%llu.%u", id.node, (unsigned long long)id.id, id.id2); } -- cgit