/* write it to the spool file */
snprintf(filename, sizeof filename,
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
/* Delete this message if delete-after-send is set */
if (delete_after_send) {
- CtdlDeleteMessages(CC->room.QRname, msgnum, "");
+ CtdlDeleteMessages(CC->room.QRname, msgnum, "", 0);
}
}
}
snprintf(filename, sizeof filename,
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
dp = opendir(
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
if ((strcmp(d->d_name, ".")) && (strcmp(d->d_name, ".."))) {
snprintf(filename, sizeof filename,
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
closedir(dp);
}
-#ifdef ___DISABLED___
/*
* Delete any files in the outbound queue that were intended
* to be sent to nodes which no longer exist.
dp = opendir(
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
continue;
snprintf(filename, sizeof filename,
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
closedir(dp);
}
-#endif /* ___DISABLED___ */
/*
/* TODO: make move inline. forking is verry expensive. */
snprintf(buf, sizeof buf, "mv %s "
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
snprintf(sfname, sizeof sfname,
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif /* HAVE_SPOOL_DIR */
bytes_written, remote_nodename);
lprintf(CTDL_DEBUG, "<%s\n", buf);
if (buf[0] == '2') {
+ lprintf(CTDL_DEBUG, "Removing <%s>\n", sfname);
unlink(sfname);
}
}
if (poll == 0) {
snprintf(spoolfile, sizeof spoolfile,
#ifndef HAVE_SPOOL_DIR
- CTDLDIR
+ "."
#else
SPOOL_DIR
#endif
*/
void create_spool_dirs(void) {
#ifndef HAVE_SPOOL_DIR
- mkdir(CTDLDIR "/network", 0700);
- mkdir(CTDLDIR "/network/systems", 0700);
- mkdir(CTDLDIR "/network/spoolin", 0700);
- mkdir(CTDLDIR "/network/spoolout", 0700);
+ mkdir("./network", 0700);
+ mkdir("./network/systems", 0700);
+ mkdir("./network/spoolin", 0700);
+ mkdir("./network/spoolout", 0700);
#else
mkdir(SPOOL_DIR "/network", 0700);
mkdir(SPOOL_DIR "/network/systems", 0700);
free_filter_list(filterlist);
filterlist = NULL;
- /* network_purge_spoolout(); */
+ network_purge_spoolout();
lprintf(CTDL_DEBUG, "network: queue run completed\n");