]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
comm_udp_send() not used anywhere!
authorwessels <>
Tue, 28 Oct 1997 04:58:48 +0000 (04:58 +0000)
committerwessels <>
Tue, 28 Oct 1997 04:58:48 +0000 (04:58 +0000)
src/comm.cc
src/protos.h

index 80069256e7462168ce97a5d78c50f1ea8b5f91f9..8c983158282db952aad7a5e44769f338fac1a536 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.197 1997/10/26 06:26:25 wessels Exp $
+ * $Id: comm.cc,v 1.198 1997/10/27 21:58:48 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -620,34 +620,6 @@ comm_close(int fd)
 #endif
 }
 
-
-/* Send a udp datagram to specified PORT at HOST. */
-int
-comm_udp_send(int fd, const char *host, u_short port, const char *buf, int len)
-{
-    const ipcache_addrs *ia = NULL;
-    static struct sockaddr_in to_addr;
-    int bytes_sent;
-
-    /* Set up the destination socket address for message to send to. */
-    to_addr.sin_family = AF_INET;
-
-    if ((ia = ipcache_gethostbyname(host, IP_BLOCKING_LOOKUP)) == 0) {
-       debug(50, 1) ("comm_udp_send: gethostbyname failure: %s: %s\n",
-           host, xstrerror());
-       return (COMM_ERROR);
-    }
-    to_addr.sin_addr = ia->in_addrs[ia->cur];
-    to_addr.sin_port = htons(port);
-    if ((bytes_sent = sendto(fd, buf, len, 0, (struct sockaddr *) &to_addr,
-               sizeof(to_addr))) < 0) {
-       debug(50, 1) ("comm_udp_send: sendto failure: FD %d: %s\n",
-           fd, xstrerror());
-       return COMM_ERROR;
-    }
-    return bytes_sent;
-}
-
 /* Send a udp datagram to specified TO_ADDR. */
 int
 comm_udp_sendto(int fd,
index bb5fbad2495f267c09be0ea589770c2f8ccd818f..b7dfe7bc4beaffce8d6abb2ed6ac964f1b8889c7 100644 (file)
@@ -98,7 +98,6 @@ extern int comm_select(time_t);
 extern void commSetSelect(int, unsigned int, PF *, void *, time_t);
 extern void comm_add_close_handler(int fd, PF *, void *);
 extern void comm_remove_close_handler(int fd, PF *, void *);
-extern int comm_udp_send(int fd, const char *host, u_short port, const char *buf, int len);
 extern int comm_udp_sendto(int fd, const struct sockaddr_in *, int size, const char *buf, int len);
 extern void comm_write(int fd,
     char *buf,