summaryrefslogtreecommitdiff
path: root/src/manager/xml.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-02-23 10:34:14 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-02-23 10:34:14 +0000
commited7d79f96177044949744da10f4431c1d6242241 (patch)
tree3aabaa55ed3b5291daef891cfee9befb5235e2b8 /src/manager/xml.c
parent7410d3c6d6a9a1cd7aa55083c938946af6ff9498 (diff)
downloadvyos-strongswan-ed7d79f96177044949744da10f4431c1d6242241.tar.gz
vyos-strongswan-ed7d79f96177044949744da10f4431c1d6242241.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.3.6)
Diffstat (limited to 'src/manager/xml.c')
-rw-r--r--src/manager/xml.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/manager/xml.c b/src/manager/xml.c
index 5aa2e3e1e..a9ef60c24 100644
--- a/src/manager/xml.c
+++ b/src/manager/xml.c
@@ -32,22 +32,22 @@ struct private_xml_t {
* public functions
*/
xml_t public;
-
+
/**
* root node of this xml (part)
*/
xmlNode *node;
-
+
/**
* document, only for root xml_t
*/
xmlDoc *doc;
-
+
/**
* Root xml_t*
*/
private_xml_t *root;
-
+
/**
* number of enumerator instances
*/
@@ -79,10 +79,10 @@ static bool child_enumerate(child_enum_t *e, private_xml_t **child,
if (e->node)
{
xmlNode *text;
-
+
text = e->node->children;
*value = NULL;
-
+
while (text && text->type != XML_TEXT_NODE)
{
text = text->next;
@@ -109,7 +109,7 @@ static char* get_attribute(private_xml_t *this, char *name)
}
/**
- * destroy enumerator, and complete tree if this was the last enumerator
+ * destroy enumerator, and complete tree if this was the last enumerator
*/
static void child_destroy(child_enum_t *this)
{
@@ -145,10 +145,10 @@ static enumerator_t* children(private_xml_t *this)
xml_t *xml_create(char *xml)
{
private_xml_t *this = malloc_thing(private_xml_t);
-
+
this->public.get_attribute = (char*(*)(xml_t*,char*))get_attribute;
this->public.children = (enumerator_t*(*)(xml_t*))children;
-
+
this->doc = xmlReadMemory(xml, strlen(xml), NULL, NULL, 0);
if (this->doc == NULL)
{
@@ -158,7 +158,7 @@ xml_t *xml_create(char *xml)
this->node = xmlDocGetRootElement(this->doc);
this->root = this;
this->enums = 0;
-
+
return &this->public;
}