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

Function w_append_msg_branch

core_cmds.c:986–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984
985
986static 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
1014static int w_remove_msg_branch(struct sip_msg *msg, int *branch)
1015{

Callers

nothing calls this directly

Calls 1

append_msg_branchFunction · 0.85

Tested by

no test coverage detected