37,11 → 37,13 |
}; |
|
|
int net_dnsresolve(char *ip, const char *name) { |
int net_dnsresolve(char *ip, const char *name, int retries) { |
unsigned long ipnum; |
ipnum = resolve(name); /* I could use WatTCP's lookup_host() here to do all |
the job for me, unfortunately lookup_host() issues |
wild outs() calls putting garbage on screen... */ |
do { |
ipnum = resolve(name); /* I could use WatTCP's lookup_host() to do all the |
job for me, unfortunately lookup_host() issues |
wild outs() calls putting garbage on screen... */ |
} while ((ipnum == 0) && (retries-- > 0)); |
if (ipnum == 0) return(-1); |
_inet_ntoa(ip, ipnum); /* convert to string */ |
return(0); |