public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: fabbione@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, master, updated. cluster-2.99.05-19-gf0a2cb5
Date: Wed, 25 Jun 2008 09:29:00 -0000	[thread overview]
Message-ID: <20080625092933.26628.qmail@sourceware.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=f0a2cb52271835a65abb00b9cf64ce82f6c3cf6e

The branch, master has been updated
       via  f0a2cb52271835a65abb00b9cf64ce82f6c3cf6e (commit)
      from  39d39c61e694e7d7f0869c477392e532e8088a1d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f0a2cb52271835a65abb00b9cf64ce82f6c3cf6e
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   Wed Jun 25 11:29:02 2008 +0200

    [CONFIG] Fix several bugs in XML parsing implementations
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 config/libs/libccsconfdb/libccs.c |   13 ++++++++-----
 config/plugins/xml/config.c       |    5 ++++-
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/config/libs/libccsconfdb/libccs.c b/config/libs/libccsconfdb/libccs.c
index ea67f8b..278c9c7 100644
--- a/config/libs/libccsconfdb/libccs.c
+++ b/config/libs/libccsconfdb/libccs.c
@@ -594,8 +594,10 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)
 
 	if (list && !strcmp(query, previous_query))
 		xmllistindex++;
-	else
+	else {
+		memset(previous_query, 0, PATH_MAX);
 		xmllistindex = 0;
+	}
 
 	memset(realquery, 0, PATH_MAX + 16);
 	snprintf(realquery, PATH_MAX + 16 - 1, "/objdbmaindoc%s", query);
@@ -605,13 +607,14 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)
 	if(!obj)
 		return -EINVAL;
 
-	if (obj->nodesetval && (obj->nodesetval->nodeNr > 0) ) {
+	if (obj->nodesetval && (obj->nodesetval->nodeNr > 0)) {
 		xmlNodePtr node;
 		int size = 0, nnv = 0;
 
 		if(xmllistindex >= obj->nodesetval->nodeNr){
+			memset(previous_query, 0, PATH_MAX);
 			xmllistindex = 0;
-			res = -1;
+			res = -ENODATA;
 			goto fail;
 		}
 
@@ -627,7 +630,6 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)
 			if (node->children && node->children->content)
 				size = strlen((char *)node->children->content) +
 					strlen((char *)node->name)+2;
-
 			else
 				size = strlen((char *)node->name)+2;
 
@@ -657,7 +659,8 @@ int _ccs_get_fullxpath(int desc, const char *query, char **rtn, int list)
 		if(list)
 			strncpy(previous_query, query, PATH_MAX-1);
 
-	}
+	} else
+		res = -EINVAL;
 
 fail:
 	if(obj)
diff --git a/config/plugins/xml/config.c b/config/plugins/xml/config.c
index 1fd3e69..84eee55 100644
--- a/config/plugins/xml/config.c
+++ b/config/plugins/xml/config.c
@@ -58,12 +58,15 @@ static char *do_xml_query(xmlXPathContextPtr ctx, char *query, int list) {
 
 	if (list && !strcmp(query, previous_query))
 		xmllistindex++;
-	else
+	else {
+		memset(previous_query, 0, PATH_MAX);
 		xmllistindex = 0;
+	}
 
 	obj = xmlXPathEvalExpression((xmlChar *)query, ctx);
 	if (obj && obj->nodesetval && (obj->nodesetval->nodeNr > 0)) {
 		if (xmllistindex >= obj->nodesetval->nodeNr) {
+			memset(previous_query, 0, PATH_MAX);
 			xmllistindex = 0;
 			goto fail;
 		}


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-06-25  9:29 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=20080625092933.26628.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@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: link
Be 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).