aboutsummaryrefslogtreecommitdiff
path: root/src/null.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-24 00:49:40 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-24 00:57:16 +0200
commit4213ec5ef9695aa504938c0e764ba9a4f08921b2 (patch)
tree88ac2b2eb01337f0924d687df38b2a163bc94e11 /src/null.c
parent337a06f32fb530e0e0884fef2f5f630cca9911a1 (diff)
downloadwydawca-4213ec5ef9695aa504938c0e764ba9a4f08921b2.tar.gz
wydawca-4213ec5ef9695aa504938c0e764ba9a4f08921b2.tar.bz2
Initial implementation of daemon mode.
* gconf/gconf-gram.y (string_to_sockaddr_: Take struct gconf_sockaddr as the first argument. * gconf/gconf.h (struct gconf_sockaddr): New data type. * src/job.c, src/net.c, src/pidfile.c: New files. * src/Makefile.am (wydawca_SOURCES): Add job.c, net.c, pidfile.c * src/cmdline.opt: New options: --cron (change semantics), --force, --foreground, --single-process, --spool * src/wydawca.c: New daemon mode. * src/config.c: New statements: spool.alias, daemon, foreground, single-process, wakeup-interval, pidfile, listen * src/directive.c, src/diskio.c, src/gpg.c, src/mail.c, src/null.c, src/process.c, src/triplet.c, src/verify.c, src/vtab.c, src/wydawca.h: use static struct spool wherever feasible. * src/triplet.c: New meta-variable "spool" * tests/etc/wydawca.rcin: Update. * tests/upload-dry.at: Update.
Diffstat (limited to 'src/null.c')
-rw-r--r--src/null.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/null.c b/src/null.c
index 7ead150..6a1b0a7 100644
--- a/src/null.c
+++ b/src/null.c
@@ -17,13 +17,13 @@
#include "wydawca.h"
int
-null_move_file (struct file_triplet *trp, struct spool *spool,
+null_move_file (struct file_triplet *trp, const struct spool *spool,
enum file_type file_id, const char *reldir)
{
const char *file_name = trp->file[file_id].name;
if (debug_level)
- logmsg (LOG_DEBUG, _("%s: installing file `%s/%s'"),
- spool->url, reldir, file_name);
+ logmsg (LOG_DEBUG, _("spool %s: installing file `%s/%s'"),
+ spool->tag, reldir, file_name);
UPDATE_STATS (STAT_UPLOADS);
if (unlink (file_name))
{
@@ -35,34 +35,34 @@ null_move_file (struct file_triplet *trp, struct spool *spool,
}
int
-null_archive_file (struct file_triplet *trp, struct spool *spool,
+null_archive_file (struct file_triplet *trp, const struct spool *spool,
const char *file_name, const char *reldir)
{
if (debug_level)
- logmsg (LOG_DEBUG, _("%s: archiving `%s'"), spool->url, file_name);
+ logmsg (LOG_DEBUG, _("spool %s: archiving `%s'"), spool->tag, file_name);
UPDATE_STATS (STAT_ARCHIVES);
return 0;
}
int
-null_symlink_file (struct file_triplet *trp, struct spool *spool,
+null_symlink_file (struct file_triplet *trp, const struct spool *spool,
const char *reldir,
const char *wanted_src, const char *wanted_dst)
{
if (debug_level)
- logmsg (LOG_DEBUG, _("%s: symlinking `%s' to `%s'"),
- spool->url, wanted_src, wanted_dst);
+ logmsg (LOG_DEBUG, _("spool %s: symlinking `%s' to `%s'"),
+ spool->tag, wanted_src, wanted_dst);
UPDATE_STATS (STAT_SYMLINKS);
return 0;
}
int
-null_rmsymlink_file (struct file_triplet *trp, struct spool *spool,
+null_rmsymlink_file (struct file_triplet *trp, const struct spool *spool,
const char *reldir, const char *file_name)
{
if (debug_level)
- logmsg (LOG_DEBUG, _("%s: removing symlink `%s/%s'"),
- spool->url, reldir, file_name);
+ logmsg (LOG_DEBUG, _("spool %s: removing symlink `%s/%s'"),
+ spool->tag, reldir, file_name);
UPDATE_STATS (STAT_RMSYMLINKS);
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.