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

Function parse_rr

parser/parse_rr.c:155–177  ·  view source on GitHub ↗

* Parse Route and Record-Route header fields */

Source from the content-addressed store, hash-verified

153 * Parse Route and Record-Route header fields
154 */
155int parse_rr(struct hdr_field* _h)
156{
157 rr_t* r = NULL;
158
159 if (!_h) {
160 LM_ERR("invalid parameter value\n");
161 return -1;
162 }
163
164 if (_h->parsed) {
165 /* Already parsed, return */
166 return 0;
167 }
168
169 if(do_parse_rr_body(_h->body.s, _h->body.len, &r) < 0) {
170 set_err_info(OSER_EC_PARSER, OSER_EL_MEDIUM,
171 "error parsing RR headers");
172 set_err_reply(400, "bad headers");
173 return -1;
174 }
175 _h->parsed = (void*)r;
176 return 0;
177}
178
179/*
180 * Free list of rrs

Callers 11

b2b_prescript_fFunction · 0.85
process_routesetFunction · 0.85
assemble_msgFunction · 0.85
get_route_setFunction · 0.85
l_siplua_getRouteFunction · 0.85
find_first_routeFunction · 0.85
find_next_routeFunction · 0.85
find_rem_targetFunction · 0.85
get_route_setFunction · 0.85
print_rr_bodyFunction · 0.85
pn_async_process_purrFunction · 0.85

Calls 3

do_parse_rr_bodyFunction · 0.85
set_err_infoFunction · 0.85
set_err_replyFunction · 0.85

Tested by

no test coverage detected