]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix announcment sending. Can't have NULL callback data I guess.
authorwessels <>
Sat, 28 Mar 1998 01:41:12 +0000 (01:41 +0000)
committerwessels <>
Sat, 28 Mar 1998 01:41:12 +0000 (01:41 +0000)
Also, don't require that announce_file be non-null and exist.

src/cache_cf.cc
src/cf.data.pre
src/send-announce.cc

index db044696e689880ca9f820a155e945f43d9fd969..f3a36376e635c78acb3bd0d6751def4757643e04 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.263 1998/03/25 09:21:43 kostas Exp $
+ * $Id: cache_cf.cc,v 1.264 1998/03/27 18:41:13 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -272,7 +272,6 @@ configDoConfigure(void)
     requirePathnameExists("unlinkd_program", Config.Program.unlinkd);
     if (Config.Program.redirect)
        requirePathnameExists("redirect_program", Config.Program.redirect);
-    requirePathnameExists("announce_file", Config.Announce.file);
     requirePathnameExists("Icon Directory", Config.icons.directory);
     requirePathnameExists("Error Directory", Config.errorDirectory);
 }
index b096dc6aef95e16ac0bf7d978a39a68c206fadb4..7d9fcd67ad76667b08ee362d9a7413d9f9cd7e86 100644 (file)
@@ -1404,13 +1404,13 @@ DOC_END
 
 NAME: announce_host
 TYPE: string
-DEFAULT: sd.cache.nlanr.net
+DEFAULT: tracker.ircache.net
 LOC: Config.Announce.host
 DOC_NONE
 
 NAME: announce_file
 TYPE: string
-DEFAULT: /dev/null
+DEFAULT: none
 LOC: Config.Announce.file
 DOC_NONE
 
@@ -1422,13 +1422,12 @@ DOC_START
        announce_host and announce_port set the hostname and portnumber where
        the registration message will be sent.
 
-       Hostname will default to 'sd.cache.nlanr.net' and port will default
+       Hostname will default to 'tracker.ircache.net' and port will default
        to 3131.  If the 'filename' argument is given, the contents of that
        file will be included in the announce message.
 
-announce_host sd.cache.nlanr.net
+announce_host tracker.ircache.net
 announce_port 3131
-announce_file /dev/null
 DOC_END
 
 COMMENT_START
index 730bef06e0da69df2cf0000a79468aa86eead505..37ac82818bf55d502dfe7552c868e55350467a40 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: send-announce.cc,v 1.47 1998/03/23 22:07:28 wessels Exp $
+ * $Id: send-announce.cc,v 1.48 1998/03/27 18:41:14 wessels Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -36,14 +36,16 @@ static IPH send_announce;
 void
 start_announce(void *datanotused)
 {
+    void *junk;
     if (0 == Config.onoff.announce)
        return;
-    ipcache_nbgethostbyname(Config.Announce.host, send_announce, NULL);
+    cbdataAdd(junk = xmalloc(1), MEM_NONE);
+    ipcache_nbgethostbyname(Config.Announce.host, send_announce, junk);
     eventAdd("send_announce", start_announce, NULL, Config.Announce.period);
 }
 
 static void
-send_announce(const ipcache_addrs * ia, void *datanotused)
+send_announce(const ipcache_addrs * ia, void *junk)
 {
     LOCAL_ARRAY(char, tbuf, 256);
     LOCAL_ARRAY(char, sndbuf, BUFSIZ);
@@ -54,6 +56,7 @@ send_announce(const ipcache_addrs * ia, void *datanotused)
     int l;
     int n;
     int fd;
+    cbdataFree(junk);
     if (ia == NULL) {
        debug(27, 1) ("send_announce: Unknown host '%s'\n", host);
        return;