Also, don't require that announce_file be non-null and exist.
/*
- * $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
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);
}
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
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
/*
- * $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
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);
int l;
int n;
int fd;
+ cbdataFree(junk);
if (ia == NULL) {
debug(27, 1) ("send_announce: Unknown host '%s'\n", host);
return;