| 636 | |
| 637 | |
| 638 | static 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 | |
| 661 | static inline int _copy_branch(struct sip_msg *msg, struct dset_ctx *dsct, |
no test coverage detected