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

Function append_keys

modules/db_http/http_dbase.c:189–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187
188
189static int append_keys (var_str * q,const char * name, const db_key_t* k,
190 int n, int * started )
191{
192 int i;
193
194 if( k != NULL)
195 {
196 if( *started )
197 CHECK(append_const(q,"&"),0,error);
198
199 CHECK(append_const(q,(char*)name),0,error);
200 CHECK(append_const(q,"="),0,error);
201
202 for(i=0;i<n;i++)
203 {
204
205 CHECK(append_str(q,url_encode(*k[i])),0,error);
206 if( i < n-1)
207 CHECK(append_const(q,val_delim_s),0,error);
208 }
209 *started = 1;
210 }
211
212 return 0;
213
214error:
215 return -1;
216
217}
218
219static int append_values (var_str * q,const char * name, const db_val_t* v,
220 int n, int * started )

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