rem: struct hostent  *nhost;
context: int t_forward_uri( struct sip_msg* p_msg, char* foo, char* bar  ){   struct hostent  *nhost;   unsigned int     ip, port;   struct sip_uri    parsed_uri;   str                      uri;   int                      err;   /* it's about the same transaction or not? */	if (t_check( p_msg  , 0 )==-1) return -1;   /*if T hasn't been found after all -> return not found (error) */   if ( !T )   {      DBG("DEBUG: t_forward_uri: no transaction found in order  to forward the request\n");      return -1;   }   /* 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: t_forward_uri: unable to parse destination uri\n");        return  -1;   }   /* getting host address*/   nhost = gethostbyname( parsed_uri.host.s );    if ( !nhost )   {      LOG(L_ERR, "ERROR: t_forward_uri: cannot resolve host\n");      return -1;   }   memcpy(&ip, nhost->h_addr_list[0], sizeof(unsigned int));   /* 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: t_forward_uri: converting port from str to int failed; using default SIP port\n");           port = SIP_PORT;       }   }   port = htons( port );   free_uri( &parsed_uri );   return t_forward( p_msg , ip , port );}