Bläddra i källkod

* Unused functions

svn: 1381
Bryan Drewery 21 år sedan
förälder
incheckning
f7602d6298
2 ändrade filer med 0 tillägg och 60 borttagningar
  1. 0 58
      src/dns.c
  2. 0 2
      src/dns.h

+ 0 - 58
src/dns.c

@@ -246,61 +246,3 @@ void call_ipbyhost(char *hostn, in_addr_t ip, int ok)
     de = nde;
   }
 }
-
-
-/*
- *    Async DNS emulation functions
- */
-
-void block_dns_hostbyip(in_addr_t ip)
-{
-  struct hostent *hp = NULL;
-  in_addr_t addr = htonl(ip);
-  static char s[UHOSTLEN] = "";
-
-  if (!setjmp(alarmret)) {
-    alarm(resolve_timeout);
-    hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
-    alarm(0);
-    if (hp) {
-      strncpyz(s, hp->h_name, sizeof s);
-    } else
-      strcpy(s, iptostr(addr));
-  } else {
-    hp = NULL;
-    strcpy(s, iptostr(addr));
-  }
-  /* Call hooks. */
-  call_hostbyip(ip, s, hp ? 1 : 0);
-}
-
-void block_dns_ipbyhost(char *host)
-{
-  struct in_addr inaddr;
-
-  /* Check if someone passed us an IP address as hostname
-   * and return it straight away */
-  if (egg_inet_aton(host, &inaddr)) {
-    call_ipbyhost(host, ntohl(inaddr.s_addr), 1);
-    return;
-  }
-  if (!setjmp(alarmret)) {
-    struct hostent *hp = NULL;
-    struct in_addr *in = NULL;
-    in_addr_t ip = 0;
-
-    alarm(resolve_timeout);
-    hp = gethostbyname(host);
-    alarm(0);
-
-    if (hp) {
-      in = (struct in_addr *) (hp->h_addr_list[0]);
-      ip = (in_addr_t) (in->s_addr);
-      call_ipbyhost(host, ntohl(ip), 1);
-      return;
-    }
-    /* Fall through. */
-  }
-  call_ipbyhost(host, 0, 0);
-}
-

+ 0 - 2
src/dns.h

@@ -50,8 +50,6 @@ typedef struct devent_str {
   u_8bit_t	lookup;		/* RES_IPBYHOST or RES_HOSTBYIP	  */
 } devent_t;
 
-void block_dns_hostbyip(in_addr_t);
-void block_dns_ipbyhost(char *);
 void call_hostbyip(in_addr_t, char *, int);
 void call_ipbyhost(char *, in_addr_t, int);
 void dcc_dnshostbyip(in_addr_t);