Commit cc4286f2 authored by gauthier's avatar gauthier

sync

parent 3e3bdd9e
......@@ -48,6 +48,9 @@
#include "hashtable.h"
#include "asn_compare.h"
#define ET_XPATH_EXPRESSION_MAX_LENGTH 400
// powers of 2
#define ET_BIT_MASK_MATCH_SCTP_STREAM 1
#define ET_BIT_MASK_MATCH_SCTP_SSN 2
......@@ -252,7 +255,7 @@ typedef struct et_s1ap_s {
uint16_t binary_stream_allocated_size;
uint8_t *binary_stream;
s1ap_message message; // decoded message: information elements
xmlNodePtr xml_node; // XML representation of the S1AP PDU
xmlDocPtr doc; // XML representation of the S1AP PDU
} et_s1ap_t;
......
......@@ -70,9 +70,12 @@ void et_parse_s1ap(xmlDocPtr doc, const xmlNode const *s1ap_node, et_s1ap_t * co
unsigned int go_deeper_in_tree = 1;
if ((NULL != s1ap_node) && (NULL != s1ap)) {
// seee http://www.xmlsoft.org/html/libxml-tree.html#xmlCopyNode
s1ap->xml_node = xmlCopyNode(s1ap_node, 1);
AssertFatal(NULL != s1ap->xml_node, "xmlCopyNode Failed");
// see http://www.xmlsoft.org/html/libxml-tree.html#xmlCopyNode
cur_node = xmlCopyNode(s1ap_node, 1);
AssertFatal(NULL != cur_node, "xmlCopyNode Failed");
s1ap->doc = xmlNewDoc(BAD_CAST "1.0");
xmlDocSetRootElement(s1ap->doc, cur_node);
for (cur_node = (xmlNode *)s1ap_node; cur_node; cur_node = cur_node->next) {
go_deeper_in_tree = 1;
if ((!xmlStrcmp(cur_node->name, (const xmlChar *)"field"))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment