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: More join wait fixes Date: Thu, 20 Aug 2009 07:24:00 -0000 [thread overview] Message-ID: <20090820072335.B101B120369@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cd7204afe474d03067e18f7d6786410893620e07 Commit: cd7204afe474d03067e18f7d6786410893620e07 Parent: be5802cb5551e566db3b4423582568a7435138e0 Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Thu Aug 20 08:22:47 2009 +0100 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Thu Aug 20 08:22:47 2009 +0100 cman: More join wait fixes If corosync exits with an error, cman_tool join could still try to loop pointlessly looking for a cman handle. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/cman_tool/join.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cman/cman_tool/join.c b/cman/cman_tool/join.c index 7d9a1dc..02ef73a 100644 --- a/cman/cman_tool/join.c +++ b/cman/cman_tool/join.c @@ -111,7 +111,7 @@ int join(commandline_t *comline, char *main_envp[]) int envptr = 0; int argvptr = 0; char scratch[1024]; - cman_handle_t h; + cman_handle_t h = NULL; int status; pid_t corosync_pid; int p[2]; @@ -269,7 +269,7 @@ int join(commandline_t *comline, char *main_envp[]) /* There might be a SUCCESS or error message in the pipe too. */ messageptr = strchr(messageptr, '\n'); - if (messageptr) + if (messageptr && strlen(messageptr) > 1) messageptr++; else continue; @@ -282,6 +282,7 @@ int join(commandline_t *comline, char *main_envp[]) } else if (messageptr) { fprintf(stderr, "%s\n", messageptr); + status = 1; break; } }
reply other threads:[~2009-08-20 7:24 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=20090820072335.B101B120369@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).