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

Function append_values

modules/db_http/http_dbase.c:219–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219static int append_values (var_str * q,const char * name, const db_val_t* v,
220 int n, int * started )
221{
222 int i;
223
224 if( v != NULL)
225 {
226 if( *started )
227 CHECK(append_const(q,"&"),0,error);
228
229 CHECK(append_const(q,(char*)name),0,error);
230 CHECK(append_const(q,"="),0,error);
231
232 for(i=0;i<n;i++)
233 {
234 CHECK(append_str(q,url_encode(value_to_string(&v[i]))),0,error);
235 if( i < n-1)
236 CHECK(append_const(q,val_delim_s),0,error);
237 }
238
239 *started = 1;
240
241 }
242 return 0;
243
244error:
245 return -1;
246
247}
248
249static int append_ops(var_str * q,const char * name, const db_op_t* op,
250 int n, int * started )

Callers 1

do_http_opFunction · 0.85

Calls 4

append_constFunction · 0.85
append_strFunction · 0.85
url_encodeFunction · 0.85
value_to_stringFunction · 0.85

Tested by

no test coverage detected