From: wessels <> Date: Tue, 28 Oct 1997 04:58:48 +0000 (+0000) Subject: comm_udp_send() not used anywhere! X-Git-Tag: SQUID_3_0_PRE1~4667 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32ca2b598af9a8b40f2c96f9638236c4ae8e4d0e;p=thirdparty%2Fsquid.git comm_udp_send() not used anywhere! --- diff --git a/src/comm.cc b/src/comm.cc index 80069256e7..8c98315828 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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, diff --git a/src/protos.h b/src/protos.h index bb5fbad249..b7dfe7bc4b 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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,