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

Function _msg_2_branch

dset.c:638–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636
637
638static inline int _msg_2_branch(struct dset_ctx *dsct,
639 struct sip_msg *msg, struct msg_branch_wrap *br)
640{
641 struct msg_branch branch;
642
643 /* run tests first */
644 memset( &branch, 0, sizeof branch);
645 branch.uri = *GET_RURI(msg);
646 branch.dst_uri = msg->dst_uri;
647 branch.path = msg->path_vec;
648 branch.q = msg->ruri_q;
649 branch.force_send_socket = msg->force_send_socket;
650 branch.bflags = msg->ruri_bflags;
651 branch.attrs = clone_avp_list(dsct->ruri_attrs);
652 /* the cloned list ^^ will remain attached to the branch */
653
654 if (_set_msg_branch( br, &branch)<0)
655 return -1;
656
657 return 0;
658}
659
660
661static inline int _copy_branch(struct sip_msg *msg, struct dset_ctx *dsct,

Callers 2

_copy_branchFunction · 0.85
swap_msg_branchesFunction · 0.85

Calls 2

clone_avp_listFunction · 0.85
_set_msg_branchFunction · 0.85

Tested by

no test coverage detected