From: pcaulfield@sourceware.org <pcaulfield@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cman/lib libcman.c libcman.h
Date: 11 Jul 2006 08:13:19 -0000 [thread overview]
Message-ID: <20060711081319.26879.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2006-07-11 08:13:18
Modified files:
cman/lib : libcman.c libcman.h
Log message:
Don't copy the agent name if it's NULL.
Make the requred size of the agent string clear.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.c.diff?cvsroot=cluster&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.25&r2=1.26
--- cluster/cman/lib/libcman.c 2006/05/10 14:20:07 1.24
+++ cluster/cman/lib/libcman.c 2006/07/11 08:13:18 1.25
@@ -943,7 +943,8 @@
ret = info_call(h, CMAN_CMD_GET_FENCE_INFO, &nodeid, sizeof(int), &f, sizeof(f));
if (!ret) {
*time = f.fence_time;
- strcpy(agent, f.fence_agent);
+ if (agent)
+ strcpy(agent, f.fence_agent);
*fenced = ((f.flags & FENCE_FLAGS_FENCED) != 0);
}
return ret;
--- cluster/cman/lib/libcman.h 2006/06/20 15:27:04 1.25
+++ cluster/cman/lib/libcman.h 2006/07/11 08:13:18 1.26
@@ -30,9 +30,10 @@
/*
* Some maxima
*/
-#define CMAN_MAX_ADDR_LEN sizeof(struct sockaddr_in6)
-#define CMAN_MAX_NODENAME_LEN 255
-#define MAX_CLUSTER_NAME_LEN 16
+#define CMAN_MAX_ADDR_LEN sizeof(struct sockaddr_in6)
+#define CMAN_MAX_NODENAME_LEN 255
+#define MAX_CLUSTER_NAME_LEN 16
+#define CMAN_MAX_FENCE_AGENT_NAME_LEN 255
/*
* Pass this into cman_get_node() as the nodeid to get local node information
@@ -286,6 +287,7 @@
/* Get fence information for a node.
* 'int *fenced' is only valid if the node is down, it is set to
* 1 if the node has been fenced since it left the cluster.
+ * agent should be CMAN_MAX_FENCE_AGENT_NAME_LEN
*/
int cman_get_fenceinfo(cman_handle_t handle, int nodeid, uint64_t *fence_time, int *fenced, char *agent);
next reply other threads:[~2006-07-11 8:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 8:13 pcaulfield [this message]
2006-07-11 19:57 ` [Cluster-devel] cluster/cman/lib libcman.c libcman.h Lon Hohberger
-- strict thread matches above, loose matches on Subject: below --
2007-05-02 10:27 pcaulfield
2007-11-05 16:43 fabbione
2007-11-09 12:51 fabbione
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060711081319.26879.qmail@sourceware.org \
--to=pcaulfield@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.