Add disable_ipv6, tidy up calls to string_is_ip_address().
[exim.git] / src / src / routers / iplookup.c
index 72392fd4d6b5940609210e68641e85e148291c73..9e9239f5fdea8e9a34a8d546ff68ff8c98f49fb3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.5 2005/12/06 10:25:59 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -137,7 +137,7 @@ iplookup_router_entry(
   router_instance *rblock,        /* data for this instantiation */
   address_item *addr,             /* address we are working on */
   struct passwd *pw,              /* passwd entry after check_local_user */
-  BOOL verify,                    /* TRUE when verifying */
+  int verify,                     /* v_none/v_recipient/v_sender/v_expn */
   address_item **addr_local,      /* add it to this if it's local */
   address_item **addr_remote,     /* add it to this if it's remote */
   address_item **addr_new,        /* put new addresses on here */
@@ -202,7 +202,7 @@ while ((hostname = string_nextinlist(&listptr, &sep, host_buffer,
   host->mx = MX_NONE;
   host->next = NULL;
 
-  if (string_is_ip_address(host->name, NULL))
+  if (string_is_ip_address(host->name, NULL) != 0)
     host->address = host->name;
   else
     {
@@ -251,7 +251,7 @@ while ((hostname = string_nextinlist(&listptr, &sep, host_buffer,
     if (send(query_socket, query, query_len, 0) < 0)
       {
       DEBUG(D_route) debug_printf("send to %s failed\n", h->address);
-      close(query_socket);
+      (void)close(query_socket);
       continue;
       }
 
@@ -259,7 +259,7 @@ while ((hostname = string_nextinlist(&listptr, &sep, host_buffer,
     next IP address. */
 
     count = ip_recv(query_socket, reply, sizeof(reply) - 1, ob->timeout);
-    close(query_socket);
+    (void)close(query_socket);
     if (count <= 0)
       {
       DEBUG(D_route) debug_printf("%s from %s\n", (errno == ETIMEDOUT)?