Fix a few more breakages from our recent changes to the server_id
authorAndrew Bartlett <abartlet@samba.org>
Mon, 4 Feb 2008 12:04:35 +0000 (23:04 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 4 Feb 2008 12:04:35 +0000 (23:04 +1100)
structure.  The BASE-TORTURE test found this problem - caused because
the messaging path was not unique.

If we didn't use a macro for cluster_id_equal(), we could make it
opaque, and avoid this...

Andrew Bartlett
(This used to be commit c3387545c57d2dd4922b4f3806b4552cee8035a3)

source4/cluster/cluster.h
source4/lib/messaging/messaging.c

index 203aef439c78902681f05429af928eaae2e32b73..7545757f2cfb3b60ae5ddd03b51cd52207c0c86b 100644 (file)
@@ -25,7 +25,9 @@
 /*
   test for same cluster id
 */
-#define cluster_id_equal(id1, id2) ((id1)->id == (id2)->id && (id1)->node == (id2)->node)
+#define cluster_id_equal(id_1, id_2) ((id_1)->id == (id_2)->id \
+                                   && (id_1)->id2 == (id_2)->id2 \
+                                   && (id_1)->node == (id_2)->node)
 
 /*
   test for same cluster node
index 9cb10f961c25199b20f2ecb5171eec370632f183..6a879ab962774f8008af09b56aea34b949042b37 100644 (file)
@@ -121,8 +121,8 @@ static NTSTATUS irpc_uptime(struct irpc_message *msg,
 */
 static char *messaging_path(struct messaging_context *msg, struct server_id server_id)
 {
-       return talloc_asprintf(msg, "%s/msg.%u.%u", msg->base_path, 
-                              (unsigned)server_id.node, (unsigned)server_id.id);
+       return talloc_asprintf(msg, "%s/msg.%s", msg->base_path, 
+                              cluster_id_string(msg, server_id));
 }
 
 /*