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

Function get_path_dst_uri

parser/parse_rr.c:480–499  ·  view source on GitHub ↗

* Path must be available. Function returns the first uri * from Path without any duplication. */

Source from the content-addressed store, hash-verified

478 * from Path without any duplication.
479 */
480int get_path_dst_uri(str *_p, str *_dst)
481{
482 rr_t *route = 0;
483
484 LM_DBG("path for branch: '%.*s'\n", _p->len, _p->s);
485
486 if(parse_rr_body(_p->s, _p->len, &route) < 0) {
487 LM_ERR("failed to parse Path body\n");
488 return -1;
489 }
490 if(!route) {
491 LM_ERR("failed to parse Path body no head found\n");
492 return -1;
493 }
494
495 *_dst = route->nameaddr.uri;
496 free_rr(&route);
497
498 return 0;
499}

Callers 6

next_branchesFunction · 0.85
compute_next_hopFunction · 0.85
get_domain_db_ucontactsFunction · 0.85
cdb_pack_ping_dataFunction · 0.85
ul_contact_event_to_msgFunction · 0.85
push_branchFunction · 0.85

Calls 2

parse_rr_bodyFunction · 0.85
free_rrFunction · 0.85

Tested by

no test coverage detected