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

Function parse_sipifmatch

parser/parse_sipifmatch.c:71–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71int
72parse_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
104void free_sipifmatch(str** _e)

Callers

nothing calls this directly

Calls 3

etag_parserFunction · 0.85
set_err_infoFunction · 0.85
set_err_replyFunction · 0.85

Tested by

no test coverage detected