[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield sourceware org	2006-11-28 11:20:04

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&r1=1.8&r2=1.9

--- cluster/ccs/ccs_tool/update.c	2006/09/18 15:49:01	1.8
+++ cluster/ccs/ccs_tool/update.c	2006/11/28 11:20:01	1.9
@@ -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"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]