public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE3 - cman: don't display the last node name if we can't get an address Date: Wed, 04 Feb 2009 11:31:00 -0000 [thread overview] Message-ID: <20090204113043.788FB1205B2@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=34fe18a15b5147c4444510e0eddc80a5ce16a11e Commit: 34fe18a15b5147c4444510e0eddc80a5ce16a11e Parent: dc8f60c70f13374a1e1e2dcb242a357ac454f247 Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Wed Feb 4 11:29:31 2009 +0000 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Wed Feb 4 11:29:31 2009 +0000 cman: don't display the last node name if we can't get an address cman_get_node_addrs can return success but 0 node addresses. This confused cman_tool into displaying the same node name twice. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/cman_tool/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c index b6e366d..87e52d3 100644 --- a/cman/cman_tool/main.c +++ b/cman/cman_tool/main.c @@ -376,7 +376,7 @@ static void print_node(commandline_t *comline, cman_handle_t h, int *format, str * (we really don't want corosync to look up names in DNS so it invents them) */ if (sscanf(node->cn_name, "Node%d", &tmpid) == 1 && tmpid == node->cn_nodeid) { - if (!cman_get_node_addrs(h, node->cn_nodeid, MAX_INTERFACES, &numaddrs, addrs)) { + if (!cman_get_node_addrs(h, node->cn_nodeid, MAX_INTERFACES, &numaddrs, addrs) && numaddrs) { getnameinfo((struct sockaddr *)addrs[0].cna_address, addrs[0].cna_addrlen, node->cn_name, sizeof(node->cn_name), NULL, 0, NI_NAMEREQD); } }
reply other threads:[~2009-02-04 11:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090204113043.788FB1205B2@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).