create ordered HF structure in pkg memory */
| 298 | |
| 299 | /* create ordered HF structure in pkg memory */ |
| 300 | static int build_hf_struct(struct sip_msg *msg, struct hf_wrapper **list) |
| 301 | { |
| 302 | struct hdr_field *h; |
| 303 | |
| 304 | *list=0; |
| 305 | /* create ordered header-field structure */ |
| 306 | for (h=msg->headers; h; h=h->next) { |
| 307 | if (!insert_hf(list,h)) { |
| 308 | LM_ERR("insert_hf failed\n"); |
| 309 | goto error00; |
| 310 | } |
| 311 | } |
| 312 | return 1; |
| 313 | error00: |
| 314 | release_hf_struct(*list); |
| 315 | *list=0; |
| 316 | return 0; |
| 317 | |
| 318 | } |
| 319 | |
| 320 | /* create env vars in malloc memory */ |
| 321 | static int create_vars(struct hf_wrapper *list, int offset) |
no test coverage detected