Subversion Repositories SvarDOS

Rev

Rev 616 | Rev 1132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 616 Rev 885
Line 35... Line 35...
35
  tcp_Socket _sock; /* watt32 socket */
35
  tcp_Socket _sock; /* watt32 socket */
36
  char tcpbuff[1];
36
  char tcpbuff[1];
37
};
37
};
38
 
38
 
39
 
39
 
40
int net_dnsresolve(char *ip, const char *name) {
40
int net_dnsresolve(char *ip, const char *name, int retries) {
41
  unsigned long ipnum;
41
  unsigned long ipnum;
-
 
42
  do {
42
  ipnum = resolve(name); /* I could use WatTCP's lookup_host() here to do all
43
    ipnum = resolve(name); /* I could use WatTCP's lookup_host() to do all the
43
                            the job for me, unfortunately lookup_host() issues
44
                              job for me, unfortunately lookup_host() issues
44
                            wild outs() calls putting garbage on screen... */
45
                              wild outs() calls putting garbage on screen... */
-
 
46
  } while ((ipnum == 0) && (retries-- > 0));
45
  if (ipnum == 0) return(-1);
47
  if (ipnum == 0) return(-1);
46
  _inet_ntoa(ip, ipnum); /* convert to string */
48
  _inet_ntoa(ip, ipnum); /* convert to string */
47
  return(0);
49
  return(0);
48
}
50
}
49
 
51