Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 fb534a9... 9d52fde... M cman/daemon/cman-preconfig.c
:100644 100644 f23f386... d3009d0... M cman/daemon/cmanconfig.c
:100644 100644 02fe88d... 1489f7c... M cman/daemon/commands.c
:100644 100644 92cfd47... b85557d... M cman/daemon/daemon.c
cman/daemon/cman-preconfig.c | 12 +++++++++---
cman/daemon/cmanconfig.c | 2 +-
cman/daemon/commands.c | 10 ++++++++--
cman/daemon/daemon.c | 2 +-
4 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index fb534a9..9d52fde 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -458,7 +458,7 @@ static int verify_nodename(struct objdb_iface_ver0 *objdb, char *node)
/* If nodename (from uname) is domain-less, try to match against
cluster.conf names which may have domainname specified */
nodes_handle = nodeslist_init(objdb, cluster_parent_handle, &find_handle);
- do {
+ while (nodes_handle) {
int len;
+ if (!nodeid_str) {
+ sprintf(error_reason, "This node has no nodeid in cluster.conf");
+ write_cman_pipe("This node has no nodeid in cluster.conf");
+ return -1;
+ }
+
nodeid = atoi(nodeid_str);
error = 0;