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

Function append_str

modules/db_http/http_dbase.c:155–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153
154
155static int append_str( var_str * to, str from)
156{
157 if(to->len + from.len > to->allocated)
158 {
159 to->s = (char*) pkg_realloc(to->s, to->len + from.len + 1);
160 to->allocated = to->len + from.len;
161
162 if( to->s == NULL)
163 {
164 LM_ERR("Out of memory\n");
165 return -1;
166 }
167 }
168
169 memcpy( to->s+to->len, from.s, from.len );
170 to->len += from.len;
171
172 to->s[to->len] = 0;
173
174 return 0;
175
176}
177
178static int append_const(var_str* to, char * from)
179{

Callers 9

build_sippingFunction · 0.85
append_constFunction · 0.85
append_keysFunction · 0.85
append_valuesFunction · 0.85
append_opsFunction · 0.85
receiveFunction · 0.85
do_http_opFunction · 0.85
assemble_msgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected