This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

master - config: Allow multiple top-level keys


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e11bc56bce2c4ad35b2695ce1de51087005e0ba6
Commit:        e11bc56bce2c4ad35b2695ce1de51087005e0ba6
Parent:        782af4651aeebfeaeb4fad7e4cb5dc87750578c0
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Thu Sep 11 16:17:34 2008 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Thu Sep 11 16:17:34 2008 +0100

config: Allow multiple top-level keys

XML & CCS config stopped reading top-level objects if it came
across a duplicate. This was due to a break where a continue should
have been.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 config/plugins/ccsais/config.c |    2 +-
 config/plugins/xml/config.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/plugins/ccsais/config.c b/config/plugins/ccsais/config.c
index 4db379b..d1e9fa6 100644
--- a/config/plugins/ccsais/config.c
+++ b/config/plugins/ccsais/config.c
@@ -151,7 +151,7 @@ static int read_config_for(int ccs_fd, struct objdb_iface_ver0 *objdb, unsigned
 		if (subkeycount > 0 && strcmp(str, subkeys[subkeycount-1]) == 0)
 		{
 			free(str);
-			break;
+			continue;
 		}
 		subkeys[subkeycount++] = str;
 	}
diff --git a/config/plugins/xml/config.c b/config/plugins/xml/config.c
index a20bf00..c2e7cc9 100644
--- a/config/plugins/xml/config.c
+++ b/config/plugins/xml/config.c
@@ -222,7 +222,7 @@ static int read_config_for(xmlXPathContextPtr ctx, struct objdb_iface_ver0 *objd
 		if (subkeycount > 0 && strcmp(str, subkeys[subkeycount-1]) == 0)
 		{
 			free(str);
-			break;
+			continue;
 		}
 		subkeys[subkeycount++] = str;
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]