Compare commits
No commits in common. 'c9' and 'i10cs' have entirely different histories.
@ -1 +1 @@
|
|||||||
SOURCES/xmlrpc-c-1.51.0.tar.xz
|
SOURCES/xmlrpc-c-1.59.02.tgz
|
||||||
|
@ -1 +1 @@
|
|||||||
784a3e74971f3b7d992d768c732daa891ffd2412 SOURCES/xmlrpc-c-1.51.0.tar.xz
|
9920446f3e57b724be0302f6422e1a9216e3280d SOURCES/xmlrpc-c-1.59.02.tgz
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
From 78e995f9f2958fc54e2a559a52c81684dc3460cf Mon Sep 17 00:00:00 2001
|
|
||||||
From: giraffedata <giraffedata@98333e67-4a24-44d7-a75c-e53540dd3050>
|
|
||||||
Date: Sun, 21 Jan 2018 22:27:31 +0000
|
|
||||||
Subject: [PATCH] Remove trace statements accidentally committed with 2977
|
|
||||||
|
|
||||||
git-svn-id: https://svn.code.sf.net/p/xmlrpc-c/code/trunk@2981 98333e67-4a24-44d7-a75c-e53540dd3050
|
|
||||||
---
|
|
||||||
src/cpp/value.cpp | 8 --------
|
|
||||||
src/xmlrpc_string.c | 5 -----
|
|
||||||
2 files changed, 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/cpp/value.cpp b/src/cpp/value.cpp
|
|
||||||
index e2c12372..b319430e 100644
|
|
||||||
--- a/src/cpp/value.cpp
|
|
||||||
+++ b/src/cpp/value.cpp
|
|
||||||
@@ -1,4 +1,3 @@
|
|
||||||
-#include <iostream>
|
|
||||||
/*****************************************************************************
|
|
||||||
value.cpp
|
|
||||||
******************************************************************************
|
|
||||||
@@ -622,13 +621,9 @@ public:
|
|
||||||
|
|
||||||
switch (nlCode) {
|
|
||||||
case value_string::nlCode_all:
|
|
||||||
- cerr << "Going to call xmlrpc_string_new_lp" << endl;
|
|
||||||
- cerr << "length = " << cppvalue.length() << ", value = "
|
|
||||||
- << cppvalue.c_str() << endl;
|
|
||||||
this->valueP = xmlrpc_string_new_lp(&env.env_c,
|
|
||||||
cppvalue.length(),
|
|
||||||
cppvalue.c_str());
|
|
||||||
- cerr << "Back from xmlrpc_string_new_lp" << endl;
|
|
||||||
break;
|
|
||||||
case value_string::nlCode_lf:
|
|
||||||
this->valueP = xmlrpc_string_new_lp_cr(&env.env_c,
|
|
||||||
@@ -661,12 +656,9 @@ value_string::value_string(std::string const& cppvalue,
|
|
||||||
|
|
||||||
value_string::value_string(std::string const& cppvalue) {
|
|
||||||
|
|
||||||
- cerr << "value_string constructor entered" << endl;
|
|
||||||
cNewStringWrapper wrapper(cppvalue, nlCode_all);
|
|
||||||
- cerr << "wrapper constructed" << endl;
|
|
||||||
|
|
||||||
this->instantiate(wrapper.valueP);
|
|
||||||
- cerr << "value_string constructor exiting" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/xmlrpc_string.c b/src/xmlrpc_string.c
|
|
||||||
index 2da61e4e..e6e00716 100644
|
|
||||||
--- a/src/xmlrpc_string.c
|
|
||||||
+++ b/src/xmlrpc_string.c
|
|
||||||
@@ -1,4 +1,3 @@
|
|
||||||
-#include <stdio.h>
|
|
||||||
/*=============================================================================
|
|
||||||
xmlrpc_string
|
|
||||||
===============================================================================
|
|
||||||
@@ -746,15 +745,12 @@ stringNew(xmlrpc_env * const envP,
|
|
||||||
enum crTreatment const crTreatment,
|
|
||||||
xmlrpc_value ** const valPP) {
|
|
||||||
|
|
||||||
- fprintf(stderr, "stringNew entered\n");
|
|
||||||
xmlrpc_value * valP;
|
|
||||||
|
|
||||||
xmlrpc_validate_utf8(envP, value, length);
|
|
||||||
|
|
||||||
if (!envP->fault_occurred) {
|
|
||||||
- fprintf(stderr, "Going to xmlrpc_createXmlrpcValue\n");
|
|
||||||
xmlrpc_createXmlrpcValue(envP, &valP);
|
|
||||||
- fprintf(stderr, "Back from createXmlrpcValue\n");
|
|
||||||
|
|
||||||
if (!envP->fault_occurred) {
|
|
||||||
valP->_type = XMLRPC_TYPE_STRING;
|
|
||||||
@@ -774,7 +770,6 @@ stringNew(xmlrpc_env * const envP,
|
|
||||||
*valPP = valP;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- fprintf(stderr, "stringNew exiting\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,317 +0,0 @@
|
|||||||
From 22c63b6ca838d257ce6b044fd893f3374d038e3f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
Date: Sun, 18 Dec 2016 11:49:03 +0100
|
|
||||||
Subject: [PATCH] cleanup and fix libxml2 backend
|
|
||||||
|
|
||||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
---
|
|
||||||
src/xmlrpc_libxml2.c | 138 +++++++++++++++++++++++++++------------------------
|
|
||||||
1 file changed, 73 insertions(+), 65 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/xmlrpc_libxml2.c b/src/xmlrpc_libxml2.c
|
|
||||||
index 207036ff..bf3d6914 100644
|
|
||||||
--- a/src/xmlrpc_libxml2.c
|
|
||||||
+++ b/src/xmlrpc_libxml2.c
|
|
||||||
@@ -43,14 +43,15 @@
|
|
||||||
#include "xmlrpc-c/base.h"
|
|
||||||
#include "xmlrpc-c/base_int.h"
|
|
||||||
#include "xmlrpc-c/string_int.h"
|
|
||||||
+#include "xmlrpc-c/util.h"
|
|
||||||
|
|
||||||
#include "xmlparser.h"
|
|
||||||
|
|
||||||
struct _xml_element {
|
|
||||||
xml_element * parentP;
|
|
||||||
const char * name;
|
|
||||||
- xmlrpc_mem_block cdata; /* char */
|
|
||||||
- xmlrpc_mem_block children; /* xml_element* */
|
|
||||||
+ xmlrpc_mem_block * cdataP; /* char */
|
|
||||||
+ xmlrpc_mem_block * childrenP; /* xml_element* */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define XMLRPC_ASSERT_ELEM_OK(elem) \
|
|
||||||
@@ -102,7 +103,7 @@ xmlElementNew(xmlrpc_env * const envP,
|
|
||||||
bool childrenAreValid;
|
|
||||||
|
|
||||||
XMLRPC_ASSERT_ENV_OK(envP);
|
|
||||||
- assert(name != NULL);
|
|
||||||
+ XMLRPC_ASSERT(name != NULL);
|
|
||||||
|
|
||||||
/* Set up our error-handling preconditions. */
|
|
||||||
retval = NULL;
|
|
||||||
@@ -112,21 +113,20 @@ xmlElementNew(xmlrpc_env * const envP,
|
|
||||||
XMLRPC_FAIL_IF_NULL(retval, envP, XMLRPC_INTERNAL_ERROR,
|
|
||||||
"Couldn't allocate memory for XML element");
|
|
||||||
|
|
||||||
+ /* Set our parent field to NULL. */
|
|
||||||
retval->parentP = NULL;
|
|
||||||
-
|
|
||||||
+
|
|
||||||
/* Copy over the element name. */
|
|
||||||
- retval->name = strdup(name);
|
|
||||||
+ retval->name = xmlrpc_strdupnull(name);
|
|
||||||
XMLRPC_FAIL_IF_NULL(retval->name, envP, XMLRPC_INTERNAL_ERROR,
|
|
||||||
"Couldn't allocate memory for XML element");
|
|
||||||
nameIsValid = true;
|
|
||||||
|
|
||||||
- /* Initialize a block to hold our CDATA. */
|
|
||||||
- XMLRPC_TYPED_MEM_BLOCK_INIT(char, envP, &retval->cdata, 0);
|
|
||||||
+ retval->cdataP = XMLRPC_MEMBLOCK_NEW(char, envP, 0);
|
|
||||||
XMLRPC_FAIL_IF_FAULT(envP);
|
|
||||||
cdataIsValid = true;
|
|
||||||
|
|
||||||
- /* Initialize a block to hold our child elements. */
|
|
||||||
- XMLRPC_TYPED_MEM_BLOCK_INIT(xml_element *, envP, &retval->children, 0);
|
|
||||||
+ retval->childrenP = XMLRPC_MEMBLOCK_NEW(xml_element *, envP, 0);
|
|
||||||
XMLRPC_FAIL_IF_FAULT(envP);
|
|
||||||
childrenAreValid = true;
|
|
||||||
|
|
||||||
@@ -136,48 +136,50 @@ cleanup:
|
|
||||||
if (nameIsValid)
|
|
||||||
xmlrpc_strfree(retval->name);
|
|
||||||
if (cdataIsValid)
|
|
||||||
- xmlrpc_mem_block_clean(&retval->cdata);
|
|
||||||
+ XMLRPC_MEMBLOCK_FREE(char, retval->cdataP);
|
|
||||||
if (childrenAreValid)
|
|
||||||
- xmlrpc_mem_block_clean(&retval->children);
|
|
||||||
+ XMLRPC_MEMBLOCK_FREE(xml_element *, retval->childrenP);
|
|
||||||
free(retval);
|
|
||||||
}
|
|
||||||
- retval = NULL;
|
|
||||||
+ return NULL;
|
|
||||||
+ } else {
|
|
||||||
+ return retval;
|
|
||||||
}
|
|
||||||
- return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
+/*=========================================================================
|
|
||||||
+** xml_element_free
|
|
||||||
+**=========================================================================
|
|
||||||
+** Blow away an existing element & all of its child elements.
|
|
||||||
+*/
|
|
||||||
void
|
|
||||||
xml_element_free(xml_element * const elemP) {
|
|
||||||
-/*----------------------------------------------------------------------------
|
|
||||||
- Blow away an existing element & all of its child elements.
|
|
||||||
------------------------------------------------------------------------------*/
|
|
||||||
- xmlrpc_mem_block * children;
|
|
||||||
- unsigned int size;
|
|
||||||
- unsigned int i;
|
|
||||||
+
|
|
||||||
+ xmlrpc_mem_block * childrenP;
|
|
||||||
+ size_t size, i;
|
|
||||||
xml_element ** contents;
|
|
||||||
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
|
|
||||||
xmlrpc_strfree(elemP->name);
|
|
||||||
elemP->name = XMLRPC_BAD_POINTER;
|
|
||||||
- xmlrpc_mem_block_clean(&elemP->cdata);
|
|
||||||
+
|
|
||||||
+ XMLRPC_MEMBLOCK_FREE(char, elemP->cdataP);
|
|
||||||
|
|
||||||
/* Deallocate all of our children recursively. */
|
|
||||||
- children = &elemP->children;
|
|
||||||
- contents = XMLRPC_TYPED_MEM_BLOCK_CONTENTS(xml_element *, children);
|
|
||||||
- size = XMLRPC_TYPED_MEM_BLOCK_SIZE(xml_element *, children);
|
|
||||||
+ childrenP = elemP->childrenP;
|
|
||||||
+ contents = XMLRPC_MEMBLOCK_CONTENTS(xml_element *, childrenP);
|
|
||||||
+ size = XMLRPC_MEMBLOCK_SIZE(xml_element *, childrenP);
|
|
||||||
for (i = 0; i < size; ++i)
|
|
||||||
xml_element_free(contents[i]);
|
|
||||||
|
|
||||||
- xmlrpc_mem_block_clean(&elemP->children);
|
|
||||||
+ XMLRPC_MEMBLOCK_FREE(xml_element *, elemP->childrenP);
|
|
||||||
|
|
||||||
free(elemP);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
/*=========================================================================
|
|
||||||
** Miscellaneous Accessors
|
|
||||||
**=========================================================================
|
|
||||||
@@ -185,36 +187,47 @@ xml_element_free(xml_element * const elemP) {
|
|
||||||
** documentation on each function works.
|
|
||||||
*/
|
|
||||||
|
|
||||||
+
|
|
||||||
+
|
|
||||||
const char *
|
|
||||||
xml_element_name(const xml_element * const elemP) {
|
|
||||||
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
+
|
|
||||||
return elemP->name;
|
|
||||||
}
|
|
||||||
|
|
||||||
+
|
|
||||||
+
|
|
||||||
size_t
|
|
||||||
-xml_element_cdata_size(const xml_element * const elemP) {
|
|
||||||
- /* The result of this function is NOT VALID until the end_element handler
|
|
||||||
- has been called!
|
|
||||||
- */
|
|
||||||
+xml_element_cdata_size (const xml_element * const elemP) {
|
|
||||||
+/*----------------------------------------------------------------------------
|
|
||||||
+ The result of this function is NOT VALID until the end_element handler
|
|
||||||
+ has been called!
|
|
||||||
+-----------------------------------------------------------------------------*/
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
- return XMLRPC_TYPED_MEM_BLOCK_SIZE(char, &elemP->cdata) - 1;
|
|
||||||
+
|
|
||||||
+ return XMLRPC_MEMBLOCK_SIZE(char, elemP->cdataP) - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const char *
|
|
||||||
xml_element_cdata(const xml_element * const elemP) {
|
|
||||||
+
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
- return XMLRPC_TYPED_MEM_BLOCK_CONTENTS(char, &elemP->cdata);
|
|
||||||
+
|
|
||||||
+ return XMLRPC_TYPED_MEM_BLOCK_CONTENTS(const char, elemP->cdataP);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned int
|
|
||||||
xml_element_children_size(const xml_element * const elemP) {
|
|
||||||
+
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
- return XMLRPC_TYPED_MEM_BLOCK_SIZE(xml_element *, &elemP->children);
|
|
||||||
+
|
|
||||||
+ return XMLRPC_MEMBLOCK_SIZE(xml_element *, elemP->childrenP);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -222,47 +235,42 @@ xml_element_children_size(const xml_element * const elemP) {
|
|
||||||
xml_element **
|
|
||||||
xml_element_children(const xml_element * const elemP) {
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
- return XMLRPC_TYPED_MEM_BLOCK_CONTENTS(xml_element *, &elemP->children);
|
|
||||||
+ return XMLRPC_MEMBLOCK_CONTENTS(xml_element *, elemP->childrenP);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-/*=========================================================================
|
|
||||||
-** Internal xml_element Utility Functions
|
|
||||||
-**=========================================================================
|
|
||||||
-*/
|
|
||||||
+/*=============================================================================
|
|
||||||
+ Internal xml_element Utility Functions
|
|
||||||
+=============================================================================*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
-xmlElementAppendCdata(xmlrpc_env * const envP,
|
|
||||||
- xml_element * const elemP,
|
|
||||||
- const char * const cdata,
|
|
||||||
- size_t const size) {
|
|
||||||
+xml_element_append_cdata(xmlrpc_env * const envP,
|
|
||||||
+ xml_element * const elemP,
|
|
||||||
+ const char * const cdata,
|
|
||||||
+ size_t const size) {
|
|
||||||
|
|
||||||
XMLRPC_ASSERT_ENV_OK(envP);
|
|
||||||
- XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
+ XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
|
|
||||||
- XMLRPC_TYPED_MEM_BLOCK_APPEND(char, envP, &elemP->cdata, cdata, size);
|
|
||||||
+ XMLRPC_MEMBLOCK_APPEND(char, envP, elemP->cdataP, cdata, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
-xmlElementAppendChild(xmlrpc_env * const envP,
|
|
||||||
- xml_element * const elemP,
|
|
||||||
- xml_element * const childP) {
|
|
||||||
-
|
|
||||||
- /* Whether or not this function succeeds, it takes ownership of the 'child'
|
|
||||||
- argument.
|
|
||||||
- WARNING - This is the exact opposite of the usual memory ownership
|
|
||||||
- rules for xmlrpc_value! So please pay attention.
|
|
||||||
- */
|
|
||||||
+xml_element_append_child(xmlrpc_env * const envP,
|
|
||||||
+ xml_element * const elemP,
|
|
||||||
+ xml_element * const childP) {
|
|
||||||
+/*----------------------------------------------------------------------------
|
|
||||||
+ Whether or not this function succeeds, it takes ownership of *childP.
|
|
||||||
+-----------------------------------------------------------------------------*/
|
|
||||||
XMLRPC_ASSERT_ENV_OK(envP);
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(elemP);
|
|
||||||
XMLRPC_ASSERT_ELEM_OK(childP);
|
|
||||||
- assert(childP->parentP == NULL);
|
|
||||||
+ XMLRPC_ASSERT(childP->parentP == NULL);
|
|
||||||
|
|
||||||
- XMLRPC_TYPED_MEM_BLOCK_APPEND(xml_element *, envP, &elemP->children,
|
|
||||||
- &childP, 1);
|
|
||||||
+ XMLRPC_MEMBLOCK_APPEND(xml_element *, envP, elemP->childrenP, &childP, 1);
|
|
||||||
if (!envP->fault_occurred)
|
|
||||||
childP->parentP = elemP;
|
|
||||||
else
|
|
||||||
@@ -317,7 +325,7 @@ startElement_(void * const userData,
|
|
||||||
/* (We need to watch our error handling invariants very carefully
|
|
||||||
** here. Read the docs for xml_elementAppendChild. */
|
|
||||||
newCurrentP = elemP;
|
|
||||||
- xmlElementAppendChild(&contextP->env, contextP->currentP, elemP);
|
|
||||||
+ xml_element_append_child(&contextP->env, contextP->currentP, elemP);
|
|
||||||
elemP = NULL;
|
|
||||||
XMLRPC_FAIL_IF_FAULT(&contextP->env);
|
|
||||||
contextP->currentP = newCurrentP;
|
|
||||||
@@ -348,7 +356,7 @@ endElement_(void * const userData,
|
|
||||||
contextP->currentP == contextP->rootP);
|
|
||||||
|
|
||||||
/* Add a trailing '\0' to our cdata. */
|
|
||||||
- xmlElementAppendCdata(&contextP->env, contextP->currentP, "\0", 1);
|
|
||||||
+ xml_element_append_cdata(&contextP->env, contextP->currentP, "\0", 1);
|
|
||||||
if (!contextP->env.fault_occurred) {
|
|
||||||
/* Pop our "stack" of elements. */
|
|
||||||
contextP->currentP = contextP->currentP->parentP;
|
|
||||||
@@ -370,9 +378,9 @@ characterData(void * const userData,
|
|
||||||
/* Get our context and see if an error has already occured. */
|
|
||||||
contextP = (ParseContext*)userData;
|
|
||||||
if (!contextP->env.fault_occurred) {
|
|
||||||
- assert(contextP->currentP != NULL);
|
|
||||||
+ XMLRPC_ASSERT(contextP->currentP != NULL);
|
|
||||||
|
|
||||||
- xmlElementAppendCdata(&contextP->env,
|
|
||||||
+ xml_element_append_cdata(&contextP->env,
|
|
||||||
contextP->currentP,
|
|
||||||
(char *)s,
|
|
||||||
len);
|
|
||||||
@@ -428,7 +436,7 @@ static xmlSAXHandler const saxHandler = {
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
-removeDocSizeLimit(xmlParserCtx * const parserP ATTR_UNUSED) {
|
|
||||||
+removeDocSizeLimit(xmlParserCtxt * const parserP ATTR_UNUSED) {
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
Set up *parserP to accept a document of any size.
|
|
||||||
|
|
||||||
@@ -451,13 +459,13 @@ removeDocSizeLimit(xmlParserCtx * const parserP ATTR_UNUSED) {
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
-createParser(xmlrpc_env * const envP,
|
|
||||||
- ParseContext * const contextP,
|
|
||||||
- xmlParserCtx ** const parserPP) {
|
|
||||||
+createParser(xmlrpc_env * const envP,
|
|
||||||
+ ParseContext * const contextP,
|
|
||||||
+ xmlParserCtxt ** const parserPP) {
|
|
||||||
/*----------------------------------------------------------------------------
|
|
||||||
Create an appropriate Libxml2 parser for our purpose.
|
|
||||||
-----------------------------------------------------------------------------*/
|
|
||||||
- xmlParserCtx * parserP;
|
|
||||||
+ xmlParserCtxt * parserP;
|
|
||||||
|
|
||||||
parserP = xmlCreatePushParserCtxt((xmlSAXHandler *)&saxHandler, contextP,
|
|
||||||
NULL, 0, NULL);
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
From d97ec6e652690a321d7ce8c81aa30f87d9c0de8f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
Date: Mon, 19 Dec 2016 21:33:47 +0100
|
|
||||||
Subject: [PATCH 2/2] chmod +x xml-rpc-api2txt
|
|
||||||
|
|
||||||
It's script which is installing into $bindir, so it must be executable.
|
|
||||||
|
|
||||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
---
|
|
||||||
tools/xml-rpc-api2txt/xml-rpc-api2txt | 0
|
|
||||||
1 file changed, 0 insertions(+), 0 deletions(-)
|
|
||||||
mode change 100644 => 100755 tools/xml-rpc-api2txt/xml-rpc-api2txt
|
|
||||||
|
|
||||||
diff --git a/tools/xml-rpc-api2txt/xml-rpc-api2txt b/tools/xml-rpc-api2txt/xml-rpc-api2txt
|
|
||||||
old mode 100644
|
|
||||||
new mode 100755
|
|
Loading…
Reference in new issue