rem: if(append_branch(msg,(*locs)->addr.uri.s,(*locs)->addr.uri.len,0)==-1){
add: if(append_branch(msg,(*locs)->addr.uri.s,(*locs)->addr.uri.len,0, 0, 0)==-1){
context: int cpl_proxy_to_loc_set( struct sip_msg *msg, struct location **locs,													unsigned char flag){	struct location *foo;	struct action act;	if (!*locs) {		LOG(L_ERR,"ERROR:cpl_c:cpl_proxy_to_loc_set: empty loc set!!\n");		goto error;	}	/* if it's the first time when this sip_msg is proxied, use the first addr	 * in loc_set to rewrite the RURI */	if (!(flag&CPL_PROXY_DONE)) {		DBG("DEBUG:cpl_c:cpl_proxy_to_loc_set: rewriting Request-URI with "			"<%s>\n",(*locs)->addr.uri.s);		/* build a new action for setting the URI */		act.type = SET_URI_T;		act.p1_type = STRING_ST;		act.p1.string = (*locs)->addr.uri.s;		act.next = 0;		/* push the action */		if (do_action(&act, msg) < 0) {			LOG(L_ERR,"ERROR:cpl_c:cpl_proxy_to_loc_set: do_action failed\n");			goto error;		}		/* is the location NATED? */		if ((*locs)->flags&CPL_LOC_NATED) setflag(msg,cpl_env.nat_flag);		/* free the location and point to the next one */		foo = (*locs)->next;		free_location( *locs );		*locs = foo;	}	/* add the rest of the locations as branches */	while(*locs) {		DBG("DEBUG:cpl_c:cpl_proxy_to_loc_set: appending branch "			"<%.*s>\n",(*locs)->addr.uri.len,(*locs)->addr.uri.s);		if(append_branch(msg,(*locs)->addr.uri.s,(*locs)->addr.uri.len,0)==-1){			LOG(L_ERR,"ERROR:cpl_c:cpl_proxy_to_loc_set: failed when "				"appending branch <%s>\n",(*locs)->addr.uri.s);			goto error;		}		/* is the location NATED? */		if ((*locs)->flags&CPL_LOC_NATED) setflag(msg,cpl_env.nat_flag);		/* free the location and point to the next one */		foo = (*locs)->next;		free_location( *locs );		*locs = foo;	}	/* run what proxy route is set */	if (cpl_env.proxy_route) {		if (run_actions( rlist[cpl_env.proxy_route], msg)<0) {			LOG(L_ERR,"ERROR:cpl_c:cpl_proxy_to_loc_set: "				"Error in do_action for proxy_route\n");		}	}	/* do t_forward */	if ( flag&CPL_IS_STATEFUL ) {		/* transaction exists */		if (cpl_fct.tmb.t_forward_nonack(msg, 0/*no proxy*/)==-1) {			LOG(L_ERR,"ERROR:cpl_c:cpl_proxy_to_loc_set: t_forward_nonack "				"failed !\n");			goto error;		}	} else {		/* no transaction -> build & fwd */		if (cpl_fct.tmb.t_relay(msg, 0, 0)==-1) {			LOG(L_ERR,"ERROR:cpl_c:cpl_proxy_to_loc_set: t_relay failed !\n");			goto error;		}	}	return 0;error:	return -1;}