|
|
|
@ -162,25 +162,8 @@ static long __cmp_ulong(const void *a, const void *b)
|
|
|
|
|
return *(ulong_t *)a - *(ulong_t *)b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int __resolvehost(const char *hostname, char *buf, int buf_len,
|
|
|
|
|
struct hostent **rhp)
|
|
|
|
|
{
|
|
|
|
|
struct hostent *hostbuf = malloc(sizeof(struct hostent));
|
|
|
|
|
struct hostent *hp = *rhp = NULL;
|
|
|
|
|
int herr = 0, hres = 0;
|
|
|
|
|
|
|
|
|
|
if(!hostbuf) return NO_ADDRESS;
|
|
|
|
|
|
|
|
|
|
hres = gethostbyname_r(hostname, hostbuf,
|
|
|
|
|
buf, buf_len, &hp, &herr);
|
|
|
|
|
|
|
|
|
|
if (!hp) return NO_ADDRESS;
|
|
|
|
|
if(hres) return NO_ADDRESS;
|
|
|
|
|
|
|
|
|
|
*rhp = hp;
|
|
|
|
|
|
|
|
|
|
return NETDB_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
extern int __resolvehost(const char *hostname, char *buf, int buf_len,
|
|
|
|
|
struct hostent **rhp);
|
|
|
|
|
|
|
|
|
|
static void __destroy_rpc_list_tree(usrtc_t *tree)
|
|
|
|
|
{
|
|
|
|
|