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

Function append_var

modules/exec/exec_hf.c:405–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405static int append_var(char *name, char *value, int len, struct hf_wrapper **list)
406{
407 struct hf_wrapper *w;
408
409 w=(struct hf_wrapper *)pkg_malloc(sizeof(struct hf_wrapper));
410 if (!w) {
411 LM_ERR("ran out of pkg mem\n");
412 return 0;
413 }
414 memset(w, 0, sizeof(struct hf_wrapper));
415 w->var_type=W_AV;
416 w->u.av.attr.s=name;
417 w->u.av.attr.len=strlen(name);
418 w->u.av.val.s=value;
419 /* NULL strings considered empty, if len unknown, calculate it now */
420 w->u.av.val.len= value==0?0:(len==0? strlen(value) : len);
421 w->next_other=*list;
422 *list=w;
423 return 1;
424}
425
426static int append_fixed_vars(struct sip_msg *msg, struct hf_wrapper **list)
427{

Callers 1

append_fixed_varsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected