From mboxrd@z Thu Jan 1 00:00:00 1970 From: pcaulfield@sourceware.org Date: 30 Nov 2006 15:57:13 -0000 Subject: [Cluster-devel] cluster/ccs/ccs_tool update.c Message-ID: <20061130155713.16496.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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"