| 97 | |
| 98 | |
| 99 | static inline str_list *new_str(char *s, int len, str_list **last, int *total) |
| 100 | { |
| 101 | str_list *new; |
| 102 | |
| 103 | new = pkg_malloc(sizeof *new); |
| 104 | if (!new) { |
| 105 | LM_ERR("no more pkg mem\n"); |
| 106 | return 0; |
| 107 | } |
| 108 | new->s.s=s; |
| 109 | new->s.len=len; |
| 110 | new->next=0; |
| 111 | |
| 112 | (*last)->next=new; |
| 113 | *last=new; |
| 114 | *total+=len; |
| 115 | |
| 116 | return new; |
| 117 | } |
| 118 | |
| 119 | |
| 120 | static inline char *get_hfblock( str *uri, struct hdr_field *hf, int *l, |