| 984 | |
| 985 | |
| 986 | static int w_append_msg_branch(struct sip_msg *msg, str *uri, int *qvalue, |
| 987 | void *flags) |
| 988 | { |
| 989 | unsigned int opts = (unsigned int)(unsigned long)flags; |
| 990 | struct msg_branch branch; |
| 991 | qvalue_t q = (int)(long)qvalue; |
| 992 | |
| 993 | if (ZSTRP(uri)) { |
| 994 | LM_ERR("appending emptry URI :(\n"); |
| 995 | return -1; |
| 996 | } |
| 997 | |
| 998 | memset( &branch, 0, sizeof branch); |
| 999 | branch.uri = *uri; |
| 1000 | |
| 1001 | if ( opts & (1<<0) ) { |
| 1002 | /* inherite the rest of the branch attrs from RURI branch */ |
| 1003 | branch.dst_uri = msg->dst_uri; |
| 1004 | branch.path = msg->path_vec; |
| 1005 | branch.q = (q==Q_UNSPECIFIED) ? get_ruri_q(msg) : q; |
| 1006 | branch.force_send_socket = msg->force_send_socket; |
| 1007 | branch.bflags = msg->ruri_bflags; |
| 1008 | } else { |
| 1009 | branch.q = q; |
| 1010 | } |
| 1011 | return append_msg_branch(&branch); |
| 1012 | } |
| 1013 | |
| 1014 | static int w_remove_msg_branch(struct sip_msg *msg, int *branch) |
| 1015 | { |
nothing calls this directly
no test coverage detected