[Cluster-devel] cluster/ccs/ccs_tool update.c

pcaulfield at sourceware.org pcaulfield at sourceware.org
Thu Nov 30 15:57:13 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL50
Changes by:	pcaulfield at sourceware.org	2006-11-30 15:57:12

Modified files:
	ccs/ccs_tool   : update.c 

Log message:
	Tell cman when the config file has been updated

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

--- cluster/ccs/ccs_tool/update.c	2006/09/18 15:49:01	1.8
+++ cluster/ccs/ccs_tool/update.c	2006/11/30 15:57:12	1.8.4.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"




More information about the Cluster-devel mailing list