public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - cman: More join wait fixes
@ 2009-08-20 7:40 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-08-20 7:40 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=40fde3c0295e7bb940e1bf4bab3b4633b50f7fe3
Commit: 40fde3c0295e7bb940e1bf4bab3b4633b50f7fe3
Parent: af693a731caa56bc18870c1dc61da04ecef245c7
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:39:53 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 fed729c..fd6d743 100644
--- a/cman/cman_tool/join.c
+++ b/cman/cman_tool/join.c
@@ -118,7 +118,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];
@@ -276,7 +276,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;
@@ -289,6 +289,7 @@ int join(commandline_t *comline, char *main_envp[])
}
else if (messageptr) {
fprintf(stderr, "%s\n", messageptr);
+ status = 1;
break;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-20 7:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 7:40 cluster: master - cman: More join wait fixes Christine Caulfield
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).