Skip to contentSkip to conversation

cluster/ccs/ccs_tool update.c

Cluster-devel [email protected] 1 participant 1 message Nov 28, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: pcaulfield at sourceware.org 2006-11-28 11:23:17

Modified files:
ccs/ccs_tool : update.c

Log message:
Tell cman when the config file is updated

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/ccs_tool/update.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8&r2=1.8.2.1

ccs/ccs_tool/update.c +7 -1
@@ -222,7 +222,7 @@
   ch->comm_flags= COMM_UPDATE_NOTICE;
   ch->comm_payload_size = doc_size;
 
-  handle = cman_init(NULL);
+  handle = cman_admin_init(NULL);
 
   cluster_fd = cman_get_fd(handle);
 
@@ -357,7 +357,13 @@
   ccs_disconnect(desc);
 
   if (v2 == v3) {
+    cman_version_t cman_ver;
     printf("Config file updated from version %d to %d\n", v1, v2);
+    cman_get_version(handle, &cman_ver);
+    cman_ver.cv_config = v2;
+    if (cman_set_version(handle, &cman_ver)) {
+	    perror("Failed to tell cman of new version number");
+    }
   } else {
     fprintf(stderr, "Warning:: Simultaneous update requests detected.\n"
 	    "  You have lost the race.\n"