| 69 | |
| 70 | |
| 71 | int |
| 72 | parse_sipifmatch(struct hdr_field* _h) |
| 73 | { |
| 74 | str *e; |
| 75 | |
| 76 | LM_DBG("called\n"); |
| 77 | |
| 78 | if (_h->parsed != 0) { |
| 79 | return 0; |
| 80 | } |
| 81 | |
| 82 | e = (str*)pkg_malloc(sizeof(str)); |
| 83 | if (e == 0) { |
| 84 | LM_ERR("no pkg memory left\n"); |
| 85 | return -1; |
| 86 | } |
| 87 | |
| 88 | memset(e, 0, sizeof(str)); |
| 89 | |
| 90 | if (etag_parser(_h->body.s, _h->body.len, e) < 0) { |
| 91 | LM_ERR("error in etag_parser\n"); |
| 92 | pkg_free(e); |
| 93 | set_err_info(OSER_EC_PARSER, OSER_EL_MEDIUM, |
| 94 | "error parsing etag headers"); |
| 95 | set_err_reply(400, "bad headers"); |
| 96 | return -2; |
| 97 | } |
| 98 | |
| 99 | _h->parsed = (void*)e; |
| 100 | return 0; |
| 101 | } |
| 102 | |
| 103 | |
| 104 | void free_sipifmatch(str** _e) |
nothing calls this directly
no test coverage detected