mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-14 21:10:02 +01:00
fixes
This commit is contained in:
parent
09afee60fb
commit
2a60032e32
1 changed files with 0 additions and 27 deletions
27
src/xml.c
27
src/xml.c
|
|
@ -26,7 +26,6 @@ static const char *soap_enc_url = "http://schemas.xmlsoap.org/soap/encoding/";
|
|||
static const char *xsd_url = "http://www.w3.org/2001/XMLSchema";
|
||||
static const char *xsi_url = "http://www.w3.org/2001/XMLSchema-instance";
|
||||
|
||||
char *g_tab_space = NULL;
|
||||
|
||||
const char *cwmp_urls[] = { "urn:dslforum-org:cwmp-1-0", "urn:dslforum-org:cwmp-1-1", "urn:dslforum-org:cwmp-1-2", "urn:dslforum-org:cwmp-1-2", "urn:dslforum-org:cwmp-1-2", "urn:dslforum-org:cwmp-1-2", NULL };
|
||||
|
||||
|
|
@ -154,7 +153,6 @@ static int build_cdu_complete_backup_operation(xmlNode *cdu, struct xml_data_str
|
|||
static int get_soap_enc_array_type(xmlNode *node, struct xml_data_struct *xml_attrs);
|
||||
static char *get_xml_node_name_switch(char *node_name);
|
||||
static char *get_xml_node_name_by_switch_name(const char *switch_node_name);
|
||||
static const char *get_node_tab_space(xmlNode *node);
|
||||
static int xml_prepare_lwnotifications(xmlNode *parameter_list);
|
||||
|
||||
struct xml_node_data xml_nodes_data[] = {
|
||||
|
|
@ -1669,7 +1667,6 @@ int xml_send_message(struct rpc *rpc)
|
|||
unsigned char *zmsg_out;
|
||||
|
||||
msg_out = convert_xml_node_to_string((xmlNode *)cwmp_ctx.session->tree_out, NULL);
|
||||
FREE(g_tab_space);
|
||||
if (msg_out == NULL) {
|
||||
CWMP_LOG(ERROR, "%s: msg_out is null", __FUNCTION__);
|
||||
return -1;
|
||||
|
|
@ -2038,29 +2035,5 @@ void load_response_xml_schema(xmlDoc **schema)
|
|||
*schema = doc;
|
||||
}
|
||||
|
||||
const char *get_node_tab_space(xmlNode *node)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
while ((node = node->parent)) {
|
||||
count = count + 1;
|
||||
}
|
||||
|
||||
if (!count)
|
||||
return "";
|
||||
|
||||
FREE(g_tab_space);
|
||||
unsigned int size = count * sizeof(CWMP_XML_TAB_SPACE) + 1;
|
||||
g_tab_space = (char *)malloc(size);
|
||||
if (!g_tab_space) {
|
||||
CWMP_LOG(ERROR, "Not able to allocate memory of size %u", size);
|
||||
return "";
|
||||
}
|
||||
|
||||
memset(g_tab_space, 0, size);
|
||||
snprintf(g_tab_space, size, "%*s", size - 1, "");
|
||||
|
||||
return g_tab_space;
|
||||
}
|
||||
|
||||
/* whitespace_cb is no longer needed with libxml2 - it has built-in formatting */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue