From 28da8ea988ce4808e774b3ae50123f0c2959ea56 Mon Sep 17 00:00:00 2001 From: Russell Zuck Date: Thu, 5 May 2011 13:22:23 -0600 Subject: [PATCH 1/4] fix for error in return status logic from libxml2 function --- src/parser_libxml2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/parser_libxml2.c b/src/parser_libxml2.c index ec9df5f..ab10a4b 100644 --- a/src/parser_libxml2.c +++ b/src/parser_libxml2.c @@ -202,5 +202,11 @@ int parser_reset(parser_t *parser) /* feed a chunk of data to the parser */ int parser_feed(parser_t *parser, char *chunk, int len) { - return xmlParseChunk(parser->xmlctx, chunk, len, 0); + /* xmlParseChunk API returns 0 on success which is opposite logic to + the status returned by parser_feed */ + if(!xmlParseChunk(parser->xmlctx, chunk, len, 0)) { + return 1; + } else { + return 0; + } } From 98714586422f6e266b6c3c0d936001bb4647ebbd Mon Sep 17 00:00:00 2001 From: Russell Zuck Date: Thu, 5 May 2011 13:32:09 -0600 Subject: [PATCH 2/4] update to README to reflect current build steps --- README.txt | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.txt b/README.txt index cf98e25..b8ed293 100644 --- a/README.txt +++ b/README.txt @@ -8,18 +8,24 @@ Our goals are: == Build Instructions == -We use the 'scons' tool to build the library, unit tests, -documentation and examples. You'll need to obtain a copy -from http://www.scons.org/ or from your system distributor. +From the top-level directory, run the following commands -Once scons is installed, invoke 'scons' in the top-level -directory to build the library. This will create a static -library (also in the top-level) directory which can be -linked into other programs. The public api is defined -in which is also in the top-level directory. +NOTE: By default libstrophe uses expat as it's XML parser. +You may pass in --with-libxml2 with the ./configure command +to switch to using libxml2 as your XML parser. -Invoke 'scons test' in the top-level directory to execute -the unit and self tests. +$ ./bootstrap.sh + +$ ./configure +or +$ ./configure --with-libxml2 + +$ make + +This will create a static library, also in the top-level +directory, which can be linked into other programs. The +public api is defined in which is also in the +top-level directory. The examples/ directory contains some examples of how to use the library; these may be helpful in addition to the From d00a70a406caeaf1153447ae77e3e6f56f79ac61 Mon Sep 17 00:00:00 2001 From: Russell Zuck Date: Thu, 5 May 2011 13:35:38 -0600 Subject: [PATCH 3/4] removed the line in Makefile.am that defines libstrophe_a_HEADERS that was causing ./configure to fail --- Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index ee21607..7a5cd57 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,6 @@ lib_LIBRARIES = libstrophe.a endif libstrophe_a_CFLAGS=$(STROPHE_FLAGS) $(PARSER_CFLAGS) -libstrophe_a_include_HEADERS = strophe.h libstrophe_a_SOURCES = src/auth.c src/conn.c src/ctx.c \ src/event.c src/handler.c src/hash.c \ src/jid.c src/md5.c src/sasl.c src/sha1.c \ From 270599246b4eb86482062b77e11af8c1b5ab121e Mon Sep 17 00:00:00 2001 From: Russell Zuck Date: Thu, 5 May 2011 14:14:42 -0600 Subject: [PATCH 4/4] update to README.txt to include instructions for acquiring the expat submodule --- README.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.txt b/README.txt index b8ed293..c33141e 100644 --- a/README.txt +++ b/README.txt @@ -6,6 +6,17 @@ Our goals are: * well documented * reliable +== GIT Instructions == + +By default, libstrophe has a dependency on the XML parsing +library expat. Expat is included as a submodule of this +repository. After cloning this repository, you will need +to run the following to acquire the expat submodule: + +$ git submodule init + +$ git submodule update + == Build Instructions == From the top-level directory, run the following commands