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

Function w_append_branch_old

core_cmds.c:932–971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932static int w_append_branch_old(struct sip_msg *msg, str *uri, int *qvalue)
933{
934 struct msg_branch branch;
935 int ret;
936 qvalue_t q = (int)(long)qvalue;
937
938 memset( &branch, 0, sizeof branch);
939
940 if (!uri) {
941 branch.uri = *GET_RURI(msg);
942 branch.dst_uri = msg->dst_uri;
943 branch.path = msg->path_vec;
944 branch.q = (q==Q_UNSPECIFIED) ? get_ruri_q(msg) : q;
945 branch.force_send_socket = msg->force_send_socket;
946 branch.bflags = msg->ruri_bflags;
947 ret = append_msg_branch(&branch);
948 /* reset all branch info */
949 msg->force_send_socket = 0;
950 setb0flags(msg,0);
951 set_ruri_q(msg,Q_UNSPECIFIED);
952 if(msg->dst_uri.s!=0)
953 pkg_free(msg->dst_uri.s);
954 msg->dst_uri.s = 0;
955 msg->dst_uri.len = 0;
956 if(msg->path_vec.s!=0)
957 pkg_free(msg->path_vec.s);
958 msg->path_vec.s = 0;
959 msg->path_vec.len = 0;
960
961 return ret;
962 } else {
963 branch.uri = *uri;
964 branch.dst_uri = msg->dst_uri;
965 branch.path = msg->path_vec;
966 branch.q = q;
967 branch.force_send_socket = msg->force_send_socket;
968 branch.bflags = msg->ruri_bflags;
969 return append_msg_branch(&branch);
970 }
971}
972
973
974static str append_mbranch_flag_names[] =

Callers

nothing calls this directly

Calls 1

append_msg_branchFunction · 0.85

Tested by

no test coverage detected