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

Function _xode_insert

modules/xmpp/xode.c:70–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static xode _xode_insert(xode parent, const char* name, unsigned int type)
71{
72 xode result;
73
74 if(parent == NULL || name == NULL) return NULL;
75
76 /* If parent->firstchild is NULL, simply create a new node for the first child */
77 if (parent->firstchild == NULL)
78 {
79 result = _xode_new(parent->p, name, type);
80 parent->firstchild = result;
81 }
82 /* Otherwise, append this to the lastchild */
83 else
84 {
85 result= _xode_appendsibling(parent->lastchild, name, type);
86 }
87 result->parent = parent;
88 parent->lastchild = result;
89 return result;
90
91}
92
93static xode _xode_search(xode firstsibling, const char* name, unsigned int type)
94{

Callers 2

xode_insert_tagFunction · 0.70
xode_insert_cdataFunction · 0.70

Calls 2

_xode_newFunction · 0.70
_xode_appendsiblingFunction · 0.70

Tested by

no test coverage detected