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

Function append_ops

modules/db_http/http_dbase.c:249–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249static int append_ops(var_str * q,const char * name, const db_op_t* op,
250 int n, int * started )
251{
252 int i;
253
254 if( op != NULL)
255 {
256 if( *started )
257 CHECK(append_const(q,"&"),0,error);
258
259 CHECK(append_const(q,(char*)name),0,error);
260 CHECK(append_const(q,"="),0,error);
261
262 for(i=0;i<n;i++)
263 {
264
265 str tmp;
266
267 tmp.s = (char*)op[i];
268 tmp.len = strlen(tmp.s);
269
270 CHECK(append_str(q,url_encode(tmp)),0,error);
271
272
273
274 if( i < n-1)
275 CHECK(append_const(q,val_delim_s),0,error);
276 }
277 *started = 1;
278 }
279 return 0;
280
281error:
282 return -1;
283}
284
285
286size_t receive(void *buffer, size_t size, size_t nmemb, void *userp)

Callers 1

do_http_opFunction · 0.85

Calls 3

append_constFunction · 0.85
append_strFunction · 0.85
url_encodeFunction · 0.85

Tested by

no test coverage detected