rem: ip=str2ip(parsed_uri.host.s, len, &err);
add: ip=str2ip( (unsigned char*)parsed_uri.host.s, len, &err);
context: int get_ip_and_port_from_uri( struct sip_msg* p_msg , unsigned int *param_ip, unsigned int *param_port){	struct hostent  *nhost;	unsigned int      ip, port;	struct sip_uri    parsed_uri;	str                      uri;	int                      err;#ifdef DNS_IP_HACK	int                      len;#endif	/* the original uri has been changed? */	if (p_msg->new_uri.s==0 || p_msg->new_uri.len==0)		uri = p_msg->first_line.u.request.uri;	else		uri = p_msg->new_uri;	/* parsing the request uri in order to get host and port */	if (parse_uri( uri.s , uri.len , &parsed_uri )<0)	{		LOG(L_ERR, "ERROR: get_ip_and_port_from_uri: "		   "unable to parse destination uri: %.*s\n", uri.len, uri.s );		goto error;	}	/* getting the port */	if ( parsed_uri.port.s==0 || parsed_uri.port.len==0 )		port = SIP_PORT;	else{		port = str2s( parsed_uri.port.s , parsed_uri.port.len , &err );		if ( err<0 ){			LOG(L_ERR, "ERROR: get_ip_and_port_from_uri: converting port "				"from str to int failed; using default SIP port\n\turi:%.*s\n",				uri.len, uri.s );			port = SIP_PORT;		}	}	port = htons( port );	/* getting host address*/#ifdef DNS_IP_HACK	len=strlen( parsed_uri.host.s );	ip=str2ip(parsed_uri.host.s, len, &err);	if (err==0)		goto success;#endif	/* fail over to normal lookup */	nhost = gethostbyname( parsed_uri.host.s );	if ( !nhost )	{		LOG(L_ERR, "ERROR: get_ip_and_port_from_uri: "		  "cannot resolve host in uri: %.*s\n", uri.len, uri.s );		free_uri(&parsed_uri);		goto error;	}	memcpy(&ip, nhost->h_addr_list[0], sizeof(unsigned int));success:	free_uri(&parsed_uri);	*param_ip = ip;	*param_port = port;	return 0;error:	*param_ip = 0;	*param_port = 0;	return -1;}