| 247 | } |
| 248 | |
| 249 | static 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 | |
| 281 | error: |
| 282 | return -1; |
| 283 | } |
| 284 | |
| 285 | |
| 286 | size_t receive(void *buffer, size_t size, size_t nmemb, void *userp) |
no test coverage detected