MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / xode_insert_node

Function xode_insert_node

modules/xmpp/xode.c:729–749  ·  view source on GitHub ↗

places copy of node and node's siblings in parent */

Source from the content-addressed store, hash-verified

727
728/* places copy of node and node's siblings in parent */
729void xode_insert_node(xode parent, xode node)
730{
731 if(node == NULL || parent == NULL)
732 return;
733
734 while(node != NULL)
735 {
736 switch(xode_get_type(node))
737 {
738 case XODE_TYPE_ATTRIB:
739 xode_put_attrib(parent, xode_get_name(node), xode_get_data(node));
740 break;
741 case XODE_TYPE_TAG:
742 xode_insert_tagnode(parent, node);
743 break;
744 case XODE_TYPE_CDATA:
745 xode_insert_cdata(parent, xode_get_data(node), xode_get_datasz(node));
746 }
747 node = xode_get_nextsibling(node);
748 }
749}
750
751
752/* produce full duplicate of x with a new xode_pool, x must be a tag! */

Callers 4

xode_send_domainFunction · 0.70
xode_insert_tagnodeFunction · 0.70
xode_dupFunction · 0.70
xode_dup_frompoolFunction · 0.70

Calls 8

xode_get_typeFunction · 0.70
xode_put_attribFunction · 0.70
xode_get_nameFunction · 0.70
xode_get_dataFunction · 0.70
xode_insert_tagnodeFunction · 0.70
xode_insert_cdataFunction · 0.70
xode_get_dataszFunction · 0.70
xode_get_nextsiblingFunction · 0.70

Tested by

no test coverage detected