]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
remove ->fd member from struct _ip_pending
authorwessels <>
Tue, 17 Jun 1997 04:01:42 +0000 (04:01 +0000)
committerwessels <>
Tue, 17 Jun 1997 04:01:42 +0000 (04:01 +0000)
move some multicast code to multicast.[ch]

src/Makefile.in
src/acl.cc
src/comm.cc
src/ftp.cc
src/ipcache.cc
src/main.cc
src/neighbors.cc
src/send-announce.cc
src/squid.h

index 2caf9a86b9e1b7229aac65535f654a42b4288e43..0d130f044fc92a65be24e8494f242dff7df13beb 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.74 1997/06/04 05:50:26 wessels Exp $
+#  $Id: Makefile.in,v 1.75 1997/06/16 22:01:42 wessels Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -101,6 +101,7 @@ OBJS                = \
                ipcache.o \
                main.o \
                mime.o \
+               multicast.o \
                neighbors.o \
                net_db.o \
                objcache.o \
index e2d5d9df56b1ab7465ec7346b9997fbaf627219d..836a938000c2291dbfc2ef06c0bd6e20e0fb93d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.96 1997/06/04 06:15:44 wessels Exp $
+ * $Id: acl.cc,v 1.97 1997/06/16 22:01:43 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -1175,7 +1175,6 @@ aclCheck(aclCheck_t * checklist)
        if (checklist->state[ACL_DST_IP] == ACL_LOOKUP_NEEDED) {
            checklist->state[ACL_DST_IP] = ACL_LOOKUP_PENDING;
            ipcache_nbgethostbyname(checklist->request->host,
-               -1,
                aclLookupDstIPDone,
                checklist);
            return;
@@ -1233,7 +1232,7 @@ aclCheckCallback(aclCheck_t * checklist, int answer)
 }
 
 static void
-aclLookupDstIPDone(int fd, const ipcache_addrs * ia, void *data)
+aclLookupDstIPDone(const ipcache_addrs * ia, void *data)
 {
     aclCheck_t *checklist = data;
     checklist->state[ACL_DST_IP] = ACL_LOOKUP_DONE;
index 5b5ba8d353ae38e4b8dc8e47eff7ad17c3fb790d..a8a55c7aae287b02f41433eb4d774ed185f4054c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.161 1997/06/04 07:02:55 wessels Exp $
+ * $Id: comm.cc,v 1.162 1997/06/16 22:01:44 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -139,6 +139,7 @@ typedef struct {
     int tries;
     struct in_addr in_addr;
     int locks;
+    int fd;
 } ConnectStateData;
 
 /* GLOBAL */
@@ -163,11 +164,11 @@ static void commSetTcpNoDelay _PARAMS((int));
 #endif
 static void commSetTcpRcvbuf _PARAMS((int, int));
 static PF commConnectFree;
-static void commConnectHandle _PARAMS((int fd, void *data));
-static void commHandleWrite _PARAMS((int fd, void *data));
+static PF commConnectHandle;
+static PF commHandleWrite;
 static int fdIsHttpOrIcp _PARAMS((int fd));
 static IPH commConnectDnsHandle;
-static void commConnectCallback _PARAMS((int fd, ConnectStateData * cs, int status));
+static void commConnectCallback _PARAMS((ConnectStateData * cs, int status));
 
 static struct timeval zero_tv;
 
@@ -329,42 +330,44 @@ void
 commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data)
 {
     ConnectStateData *cs = xcalloc(1, sizeof(ConnectStateData));
+    cs->fd = fd;
     cs->host = xstrdup(host);
     cs->port = port;
     cs->callback = callback;
     cs->data = data;
     comm_add_close_handler(fd, commConnectFree, cs);
     cs->locks++;
-    ipcache_nbgethostbyname(host, fd, commConnectDnsHandle, cs);
+    ipcache_nbgethostbyname(host, commConnectDnsHandle, cs);
 }
 
 static void
-commConnectDnsHandle(int fd, const ipcache_addrs * ia, void *data)
+commConnectDnsHandle(const ipcache_addrs * ia, void *data)
 {
     ConnectStateData *cs = data;
     assert(cs->locks == 1);
     cs->locks--;
     if (ia == NULL) {
        debug(5, 3) ("commConnectDnsHandle: Unknown host: %s\n", cs->host);
-       commConnectCallback(fd, cs, COMM_ERR_DNS);
+       commConnectCallback(cs, COMM_ERR_DNS);
        return;
     }
     cs->in_addr = ia->in_addrs[ia->cur];
-    commConnectHandle(fd, cs);
+    commConnectHandle(cs->fd, cs);
 }
 
 static void
-commConnectCallback(int fd, ConnectStateData * cs, int status)
+commConnectCallback(ConnectStateData * cs, int status)
 {
     CNCB *callback = cs->callback;
     void *data = cs->data;
+    int fd = cs->fd;
     comm_remove_close_handler(fd, commConnectFree, cs);
     commConnectFree(fd, cs);
     callback(fd, status, data);
 }
 
 static void
-commConnectFree(int fd, void *data)
+commConnectFree(int fdunused, void *data)
 {
     ConnectStateData *cs = data;
     if (cs->locks)
@@ -413,7 +416,7 @@ commConnectHandle(int fd, void *data)
        if (vizSock > -1)
            vizHackSendPkt(&cs->S, 2);
        ipcacheCycleAddr(cs->host);
-       commConnectCallback(fd, cs, COMM_OK);
+       commConnectCallback(cs, COMM_OK);
        break;
     default:
        if (commRetryConnect(fd, cs)) {
@@ -422,10 +425,10 @@ commConnectHandle(int fd, void *data)
            cs->S.sin_addr.s_addr = 0;
            ipcacheCycleAddr(cs->host);
            cs->locks++;
-           ipcache_nbgethostbyname(cs->host, fd, commConnectDnsHandle, cs);
+           ipcache_nbgethostbyname(cs->host, commConnectDnsHandle, cs);
        } else {
            ipcacheRemoveBadAddr(cs->host, cs->S.sin_addr);
-           commConnectCallback(fd, cs, COMM_ERR_CONNECT);
+           commConnectCallback(cs, COMM_ERR_CONNECT);
        }
        break;
     }
@@ -1123,47 +1126,6 @@ comm_remove_close_handler(int fd, PF * handler, void *data)
     safe_free(p);
 }
 
-int
-comm_set_mcast_ttl(int fd, int mcast_ttl)
-{
-#ifdef IP_MULTICAST_TTL
-    char ttl = (char) mcast_ttl;
-    if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, 1) < 0)
-       debug(50, 1) ("comm_set_mcast_ttl: FD %d, TTL: %d: %s\n",
-           fd, mcast_ttl, xstrerror());
-#endif
-    return 0;
-}
-
-void
-comm_join_mcast_groups(int fd, const ipcache_addrs * ia, void *data)
-{
-#ifdef IP_MULTICAST_TTL
-    struct ip_mreq mr;
-    int i;
-    int x;
-    char c = 0;
-    if (ia == NULL) {
-       debug(5, 0) ("comm_join_mcast_groups: Unknown host\n");
-       return;
-    }
-    for (i = 0; i < (int) ia->count; i++) {
-       debug(5, 10) ("Listening for ICP requests on %s\n",
-           inet_ntoa(*(ia->in_addrs + i)));
-       mr.imr_multiaddr.s_addr = (ia->in_addrs + i)->s_addr;
-       mr.imr_interface.s_addr = INADDR_ANY;
-       x = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
-           (char *) &mr, sizeof(struct ip_mreq));
-       if (x < 0)
-           debug(5, 1) ("comm_join_mcast_groups: FD %d, [%s]\n",
-               fd, inet_ntoa(*(ia->in_addrs + i)));
-       x = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &c, 1);
-       if (x < 0)
-           debug(5, 1) ("Can't disable multicast loopback: %s\n", xstrerror());
-    }
-#endif
-}
-
 static void
 commSetNoLinger(int fd)
 {
index 112c6eb3e4e8fda2effe297ade32d02e29967915..b032ef587f8acef27c4c56122f05ea5538d3c55a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.121 1997/06/06 06:16:19 wessels Exp $
+ * $Id: ftp.cc,v 1.122 1997/06/16 22:01:45 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -40,7 +40,6 @@ enum {
     FTP_REST_SUPPORTED,
     FTP_PASV_ONLY,
     FTP_AUTHENTICATED,
-    FTP_IP_LOOKUP_PENDING,
     FTP_HTTP_HEADER_SENT,
     FTP_TRIED_NLST,
     FTP_USE_BASE,
@@ -124,7 +123,6 @@ typedef void (FTPSM) _PARAMS((FtpStateData *));
 /* Local functions */
 static CNCB ftpConnectDone;
 static CNCB ftpPasvCallback;
-static IPH ftpConnect;
 static PF ftpReadData;
 static PF ftpStateFree;
 static PF ftpTimeout;
@@ -860,28 +858,6 @@ ftpStart(request_t * request, StoreEntry * entry)
     ftpState->ctrl.fd = fd;
     comm_add_close_handler(fd, ftpStateFree, ftpState);
     commSetTimeout(fd, Config.Timeout.connect, ftpTimeout, ftpState);
-    storeRegisterAbort(entry, ftpAbort, ftpState);
-    ipcache_nbgethostbyname(request->host, fd, ftpConnect, ftpState);
-}
-
-static void
-ftpConnect(int fd, const ipcache_addrs * ia, void *data)
-{
-    FtpStateData *ftpState = data;
-    request_t *request = ftpState->request;
-    StoreEntry *entry = ftpState->entry;
-    EBIT_RESET(ftpState->flags, FTP_IP_LOOKUP_PENDING);
-    assert(fd == ftpState->ctrl.fd);
-    if (ia == NULL) {
-       debug(9, 4) ("ftpConnect: Unknown host: %s\n", request->host);
-       squid_error_entry(entry, ERR_DNS_FAIL, dns_error_message);
-       comm_close(fd);
-       return;
-    }
-    debug(9, 3) ("ftpConnect: %s is %s\n", request->host,
-       inet_ntoa(ia->in_addrs[0]));
-    /* Open connection. */
-    commSetTimeout(fd, Config.Timeout.connect, ftpTimeout, ftpState);
     commConnectStart(ftpState->ctrl.fd,
        request->host,
        request->port,
@@ -907,6 +883,7 @@ ftpConnectDone(int fd, int status, void *data)
     ftpState->data.buf = xmalloc(SQUID_TCP_SO_RCVBUF);
     ftpState->data.size = SQUID_TCP_SO_RCVBUF;
     ftpState->data.freefunc = xfree;
+    storeRegisterAbort(ftpState->entry, ftpAbort, ftpState);
     commSetSelect(fd, COMM_SELECT_READ, ftpReadControlReply, ftpState, 0);
 }
 
index 3f4fbf5c4e6fb88ef2ed0b64e63ca32d640c8bcb..1f173e1ebfab6c48921966e39c6402a83e72e994 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.120 1997/06/04 06:16:01 wessels Exp $
+ * $Id: ipcache.cc,v 1.121 1997/06/16 22:01:48 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
 #include "squid.h"
 
 struct _ip_pending {
-    int fd;
     IPH *handler;
     void *handlerData;
     struct _ip_pending *next;
@@ -148,7 +147,7 @@ static int ipcacheHasPending _PARAMS((ipcache_entry *));
 static ipcache_entry *ipcache_get _PARAMS((const char *));
 static IPH dummy_handler;
 static int ipcacheExpiredEntry _PARAMS((ipcache_entry *));
-static void ipcacheAddPending _PARAMS((ipcache_entry *, int fd, IPH *, void *));
+static void ipcacheAddPending _PARAMS((ipcache_entry *, IPH *, void *));
 static void ipcacheEnqueue _PARAMS((ipcache_entry *));
 static void *ipcacheDequeue _PARAMS((void));
 static void ipcache_dnsDispatch _PARAMS((dnsserver_t *, ipcache_entry *));
@@ -460,8 +459,7 @@ ipcache_call_pending(ipcache_entry * i)
        if (p->handler) {
            nhandler++;
            dns_error_message = i->error_message;
-           p->handler(p->fd,
-               i->status == IP_CACHED ? &i->addrs : NULL,
+           p->handler(i->status == IP_CACHED ? &i->addrs : NULL,
                p->handlerData);
        }
        safe_free(p);
@@ -630,12 +628,11 @@ ipcache_dnsHandleRead(int fd, void *data)
 }
 
 static void
-ipcacheAddPending(ipcache_entry * i, int fd, IPH * handler, void *handlerData)
+ipcacheAddPending(ipcache_entry * i, IPH * handler, void *handlerData)
 {
     struct _ip_pending *pending = xcalloc(1, sizeof(struct _ip_pending));
     struct _ip_pending **I = NULL;
     i->lastref = squid_curtime;
-    pending->fd = fd;
     pending->handler = handler;
     pending->handlerData = handlerData;
     for (I = &(i->pending_head); *I; I = &((*I)->next));
@@ -645,7 +642,7 @@ ipcacheAddPending(ipcache_entry * i, int fd, IPH * handler, void *handlerData)
 }
 
 void
-ipcache_nbgethostbyname(const char *name, int fd, IPH * handler, void *handlerData)
+ipcache_nbgethostbyname(const char *name, IPH * handler, void *handlerData)
 {
     ipcache_entry *i = NULL;
     dnsserver_t *dnsData = NULL;
@@ -654,16 +651,16 @@ ipcache_nbgethostbyname(const char *name, int fd, IPH * handler, void *handlerDa
     if (!handler)
        fatal_dump("ipcache_nbgethostbyname: NULL handler");
 
-    debug(14, 4) ("ipcache_nbgethostbyname: FD %d: Name '%s'.\n", fd, name);
+    debug(14, 4) ("ipcache_nbgethostbyname: Name '%s'.\n", name);
     IpcacheStats.requests++;
 
     if (name == NULL || name[0] == '\0') {
        debug(14, 4) ("ipcache_nbgethostbyname: Invalid name!\n");
-       handler(fd, NULL, handlerData);
+       handler(NULL, handlerData);
        return;
     }
     if ((addrs = ipcacheCheckNumeric(name))) {
-       handler(fd, addrs, handlerData);
+       handler(addrs, handlerData);
        return;
     }
     if ((i = ipcache_get(name))) {
@@ -677,7 +674,7 @@ ipcache_nbgethostbyname(const char *name, int fd, IPH * handler, void *handlerDa
        debug(14, 5) ("ipcache_nbgethostbyname: MISS for '%s'\n", name);
        IpcacheStats.misses++;
        i = ipcacheAddNew(name, NULL, IP_PENDING);
-       ipcacheAddPending(i, fd, handler, handlerData);
+       ipcacheAddPending(i, handler, handlerData);
     } else if (i->status == IP_CACHED || i->status == IP_NEGATIVE_CACHED) {
        /* HIT */
        debug(14, 4) ("ipcache_nbgethostbyname: HIT for '%s'\n", name);
@@ -685,13 +682,13 @@ ipcache_nbgethostbyname(const char *name, int fd, IPH * handler, void *handlerDa
            IpcacheStats.negative_hits++;
        else
            IpcacheStats.hits++;
-       ipcacheAddPending(i, fd, handler, handlerData);
+       ipcacheAddPending(i, handler, handlerData);
        ipcache_call_pending(i);
        return;
     } else if (i->status == IP_PENDING || i->status == IP_DISPATCHED) {
        debug(14, 4) ("ipcache_nbgethostbyname: PENDING for '%s'\n", name);
        IpcacheStats.pending_hits++;
-       ipcacheAddPending(i, fd, handler, handlerData);
+       ipcacheAddPending(i, handler, handlerData);
        if (squid_curtime - i->expires > 600) {
            debug(14, 0) ("ipcache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n", name, squid_curtime + Config.negativeDnsTtl - i->expires);
            ipcacheChangeKey(i);
@@ -798,7 +795,6 @@ ipcacheUnregister(const char *name, void *data)
            if (p->handlerData != data)
                continue;
            p->handler = NULL;
-           p->fd = -1;
            n++;
        }
     }
@@ -880,7 +876,7 @@ ipcache_gethostbyname(const char *name, int flags)
        }
     }
     if (flags & IP_LOOKUP_IF_MISS)
-       ipcache_nbgethostbyname(name, -1, dummy_handler, NULL);
+       ipcache_nbgethostbyname(name, dummy_handler, NULL);
     return NULL;
 }
 
@@ -958,7 +954,7 @@ stat_ipcache_get(StoreEntry * sentry)
 }
 
 static void
-dummy_handler(int u1, const ipcache_addrs * addrs, void *u3)
+dummy_handler(const ipcache_addrs * addrs, void *u3)
 {
     return;
 }
index 08df703cc606c7d7bec2eb22a64198e01b8a05b3..b3f6ae88063d400cbf6935e32f3af4568e1e0572 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.152 1997/06/04 07:00:31 wessels Exp $
+ * $Id: main.cc,v 1.153 1997/06/16 22:01:49 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -390,10 +390,7 @@ serverConnectionsOpen(void)
                icpHandleUdp,
                NULL, 0);
            for (s = Config.mcast_group_list; s; s = s->next)
-               ipcache_nbgethostbyname(s->key,
-                   theInIcpConnection,
-                   comm_join_mcast_groups,
-                   NULL);
+               ipcache_nbgethostbyname(s->key, mcastJoinGroups, NULL);
            debug(1, 1) ("Accepting ICP connections on port %d, FD %d.\n",
                (int) port, theInIcpConnection);
 
@@ -440,37 +437,7 @@ serverConnectionsOpen(void)
            "VizHack Port");
        if (vizSock < 0)
            fatal("Could not open Viz Socket");
-#if defined(IP_ADD_MEMBERSHIP) && defined(IP_MULTICAST_TTL)
-       if (Config.vizHack.addr.s_addr > inet_addr("224.0.0.0")) {
-           struct ip_mreq mr;
-           char ttl = (char) Config.vizHack.mcast_ttl;
-           memset(&mr, '\0', sizeof(struct ip_mreq));
-           mr.imr_multiaddr.s_addr = Config.vizHack.addr.s_addr;
-           mr.imr_interface.s_addr = INADDR_ANY;
-           x = setsockopt(vizSock,
-               IPPROTO_IP,
-               IP_ADD_MEMBERSHIP,
-               (char *) &mr,
-               sizeof(struct ip_mreq));
-           if (x < 0)
-               debug(50, 1) ("IP_ADD_MEMBERSHIP: FD %d, addr %s: %s\n",
-                   vizSock, inet_ntoa(Config.vizHack.addr), xstrerror());
-           x = setsockopt(vizSock,
-               IPPROTO_IP,
-               IP_MULTICAST_TTL,
-               &ttl,
-               sizeof(char));
-           if (x < 0)
-               debug(50, 1) ("IP_MULTICAST_TTL: FD %d, TTL %d: %s\n",
-                   vizSock, Config.vizHack.mcast_ttl, xstrerror());
-           ttl = 0;
-           x = sizeof(char);
-           getsockopt(vizSock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, &x);
-           debug(1, 0) ("vizSock on FD %d, ttl=%d\n", vizSock, (int) ttl);
-       }
-#else
-       debug(1, 0) ("vizSock: Could not join multicast group\n");
-#endif
+       mcastJoinVizSock();
        memset(&Config.vizHack.S, '\0', sizeof(struct sockaddr_in));
        Config.vizHack.S.sin_family = AF_INET;
        Config.vizHack.S.sin_addr = Config.vizHack.addr;
index afd6b37ad7cf7438ce24b9b784c1f139887820ce..0f53c532a6f2392ec18928dfa512be606196b54b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.143 1997/06/04 06:16:03 wessels Exp $
+ * $Id: neighbors.cc,v 1.144 1997/06/16 22:01:50 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -482,7 +482,7 @@ neighborsUdpPing(request_t * request,
        debug(15, 4) ("neighborsUdpPing: pinging peer %s for '%s'\n",
            p->host, url);
        if (p->type == PEER_MULTICAST)
-           comm_set_mcast_ttl(theOutIcpConnection, p->mcast.ttl);
+           mcastSetTtl(theOutIcpConnection, p->mcast.ttl);
        reqnum = storeReqnum(entry, request->method);
        debug(15, 3) ("neighborsUdpPing: key = '%s'\n", entry->key);
        debug(15, 3) ("neighborsUdpPing: reqnum = %d\n", reqnum);
@@ -930,7 +930,7 @@ peerDestroy(peer * p)
 }
 
 static void
-peerDNSConfigure(int fd, const ipcache_addrs * ia, void *data)
+peerDNSConfigure(const ipcache_addrs * ia, void *data)
 {
     peer *p = data;
     struct sockaddr_in *ap;
@@ -974,8 +974,8 @@ peerRefreshDNS(void *junk)
        next = p->next;
        p->ip_lookup_pending = 1;
        /* some random, bogus FD for ipcache */
-       p->ipcache_fd = Squid_MaxFD + current_time.tv_usec;
-       ipcache_nbgethostbyname(p->host, p->ipcache_fd, peerDNSConfigure, p);
+       p->test_fd = Squid_MaxFD + current_time.tv_usec;
+       ipcache_nbgethostbyname(p->host, peerDNSConfigure, p);
     }
     /* Reconfigure the peers every hour */
     eventAdd("peerRefreshDNS", peerRefreshDNS, NULL, 3600);
@@ -991,16 +991,16 @@ peerCheckConnect(void *data)
     if (fd < 0)
        return;
     p->ip_lookup_pending = 1;
-    p->ipcache_fd = fd;
-    ipcache_nbgethostbyname(p->host, fd, peerCheckConnect2, p);
+    p->test_fd = fd;
+    ipcache_nbgethostbyname(p->host, peerCheckConnect2, p);
 }
 
 static void
-peerCheckConnect2(int fd, const ipcache_addrs * ia, void *data)
+peerCheckConnect2(const ipcache_addrs * ia, void *data)
 {
     peer *p = data;
     p->ip_lookup_pending = 0;
-    commConnectStart(fd,
+    commConnectStart(p->test_fd,
        p->host,
        p->http_port,
        peerCheckConnectDone,
@@ -1070,7 +1070,7 @@ peerCountMcastPeersStart(void *data)
     mem->start_ping = current_time;
     mem->icp_reply_callback = peerCountHandleIcpReply;
     mem->ircb_data = psstate;
-    comm_set_mcast_ttl(theOutIcpConnection, p->mcast.ttl);
+    mcastSetTtl(theOutIcpConnection, p->mcast.ttl);
     p->mcast.reqnum = storeReqnum(fake, METHOD_GET);
     query = icpCreateMessage(ICP_OP_QUERY, 0, url, p->mcast.reqnum, 0);
     icpUdpSend(theOutIcpConnection,
index dd92c085a47681a127b149f51872424824286349..34655d4fa3226b1d239e9c20f08f765b25d73d5c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: send-announce.cc,v 1.36 1997/06/04 06:16:08 wessels Exp $
+ * $Id: send-announce.cc,v 1.37 1997/06/16 22:01:51 wessels Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -38,12 +38,12 @@ start_announce(void *unused)
 {
     if (!Config.Announce.on)
        return;
-    ipcache_nbgethostbyname(Config.Announce.host, 0, send_announce, NULL);
+    ipcache_nbgethostbyname(Config.Announce.host, send_announce, NULL);
     eventAdd("send_announce", start_announce, NULL, Config.Announce.rate);
 }
 
 static void
-send_announce(int fd, const ipcache_addrs * ia, void *data)
+send_announce(const ipcache_addrs * ia, void *data)
 {
     LOCAL_ARRAY(char, tbuf, 256);
     LOCAL_ARRAY(char, sndbuf, BUFSIZ);
@@ -53,6 +53,7 @@ send_announce(int fd, const ipcache_addrs * ia, void *data)
     u_short port = Config.Announce.port;
     int l;
     int n;
+    int fd;
     if (ia == NULL) {
        debug(27, 1) ("send_announce: Unknown host '%s'\n", host);
        return;
index 07f30df4790a434a5908df9efb81244cfbdd47cf..b1a9c9227d45412210beed06df1ef5a13ce66a5c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.119 1997/06/02 01:06:16 wessels Exp $
+ * $Id: squid.h,v 1.120 1997/06/16 22:01:52 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -310,6 +310,7 @@ typedef void STCB _PARAMS((void *, char *, size_t));        /* store callback */
 #include "objcache.h"
 #include "refresh.h"
 #include "unlinkd.h"
+#include "multicast.h"
 
 #if !HAVE_TEMPNAM
 #include "tempnam.h"