rem: dst_ip.s = ip_addr2a(&m->rcv.dst_ip); dst_ip.len = strlen(dst_ip.s); dst_port.s = int2str(m->rcv.dst_port, &dst_port.len);
add: dst_ip = m->rcv.bind_address->address_str; dst_port = m->rcv.bind_address->port_no_str;
context: create_rcv_uri(str* uri, struct sip_msg* m){	static char buf[MAX_URI_SIZE];	char* p;	str src_ip, src_port, dst_ip, dst_port;	int len;	str proto;	if (!uri || !m) {		LOG(L_ERR, "create_rcv_uri: Invalid parameter value\n");		return -1;	}	src_ip.s = ip_addr2a(&m->rcv.src_ip);	src_ip.len = strlen(src_ip.s);	src_port.s = int2str(m->rcv.src_port, &src_port.len);	dst_ip.s = ip_addr2a(&m->rcv.dst_ip);	dst_ip.len = strlen(dst_ip.s);	dst_port.s = int2str(m->rcv.dst_port, &dst_port.len);	switch(m->rcv.proto) {	case PROTO_NONE:	case PROTO_UDP:		proto.s = 0; /* Do not add transport parameter, UDP is default */		proto.len = 0;		break;	case PROTO_TCP:		proto.s = "TCP";		proto.len = 3;		break;	case PROTO_TLS:		proto.s = "TLS";		proto.len = 3;		break;	case PROTO_SCTP:		proto.s = "SCTP";		proto.len = 4;		break;	default:		LOG(L_ERR, "BUG: create_rcv_uri: Unknown transport protocol\n");		return -1;	}	len = 4 + src_ip.len + 1 + src_port.len;	if (proto.s) {		len += TRANSPORT_PARAM_LEN;		len += proto.len;	}	len += DSTIP_PARAM_LEN + dst_ip.len;	len += DSTPORT_PARAM_LEN + dst_port.len;	if (len > MAX_URI_SIZE) {		LOG(L_ERR, "create_rcv_uri: Buffer too small\n");		return -1;	}	p = buf;	memcpy(p, "sip:", 4);	p += 4;		memcpy(p, src_ip.s, src_ip.len);	p += src_ip.len;	*p++ = ':';		memcpy(p, src_port.s, src_port.len);	p += src_port.len;	if (proto.s) {		memcpy(p, TRANSPORT_PARAM, TRANSPORT_PARAM_LEN);		p += TRANSPORT_PARAM_LEN;		memcpy(p, proto.s, proto.len);		p += proto.len;	}	memcpy(p, DSTIP_PARAM, DSTIP_PARAM_LEN);	p += DSTIP_PARAM_LEN;	memcpy(p, dst_ip.s, dst_ip.len);	p += dst_ip.len;	memcpy(p, DSTPORT_PARAM, DSTPORT_PARAM_LEN);	p += DSTPORT_PARAM_LEN;	memcpy(p, dst_port.s, dst_port.len);	p += dst_port.len;	uri->s = buf;	uri->len = len;	return 0;}