aboutsummaryrefslogtreecommitdiff
path: root/src/null.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-21 18:26:51 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-21 18:26:51 +0200
commit0b63c31eadfe5d4e94c7014bd0f3bd4370783d19 (patch)
tree9feb30a2c64d785d5e59fecd06429413e9f4d398 /src/null.c
parent1213cf065e9b3a5fb45d00276b3d168462838c17 (diff)
downloadwydawca-0b63c31eadfe5d4e94c7014bd0f3bd4370783d19.tar.gz
wydawca-0b63c31eadfe5d4e94c7014bd0f3bd4370783d19.tar.bz2
Implement timers and destination URLs.
* gconf/gconf-gram.y (stmt_end): Make sure end callback is called in the same environment as the begin one. * src/vtab.c, src/null.c, src/timer.c: New files. * src/Makefile.am (wydawca_SOURCES): Add new files. * src/config.c (cb_mailer): Remove useless check. (cb_destination_url): New function. (directory_kw): Change handling of the destination keyword. (cb_directory): Rewrite final checks. * src/directive.c, /src/process.c, src/triplet.c: Add timers. * src/diskio.c (move_file, archive_file, symlink_file, rmsymlink_file): Prefix with dir_. * src/mail.c (mail_stats): Add timer meta-variables. * src/wydawca.c (make_stat_expansion): Change definition. * src/wydawca.h (struct virt_tab): New data type. (struct directory_pair.dest_url): New member. * tests/upload-dry.at: Update expected output.
Diffstat (limited to 'src/null.c')
-rw-r--r--src/null.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/null.c b/src/null.c
new file mode 100644
index 0000000..3c17361
--- /dev/null
+++ b/src/null.c
@@ -0,0 +1,58 @@
+/* wydawca - automatic release submission daemon
+ Copyright (C) 2009 Sergey Poznyakoff
+
+ Wydawca is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ Wydawca is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with wydawca. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "wydawca.h"
+
+int
+null_move_file (struct file_triplet *trp, struct directory_pair *dpair,
+ enum file_type file_id, const char *reldir)
+{
+ if (debug_level)
+ logmsg (LOG_DEBUG, "%s: installing file `%s/%s'",
+ dpair->url, reldir, trp->file[file_id].name);
+ return 0;
+}
+
+int
+null_archive_file (struct file_triplet *trp, struct directory_pair *dpair,
+ const char *file_name, const char *reldir)
+{
+ if (debug_level)
+ logmsg (LOG_DEBUG, "%s: archiving `%s'", dpair->url, file_name);
+ return 0;
+}
+
+int
+null_symlink_file (struct file_triplet *trp, struct directory_pair *dpair,
+ const char *reldir,
+ const char *wanted_src, const char *wanted_dst)
+{
+ if (debug_level)
+ logmsg (LOG_DEBUG, "%s: symlinking `%s' to `%s'",
+ dpair->url, wanted_src, wanted_dst);
+ return 0;
+}
+
+int
+null_rmsymlink_file (struct file_triplet *trp, struct directory_pair *dpair,
+ const char *reldir, const char *file_name)
+{
+ if (debug_level)
+ logmsg (LOG_DEBUG, "%s: removing symlink `%s/%s'",
+ dpair->url, reldir, file_name);
+ return 0;
+}
+

Return to:

Send suggestions and report system problems to the System administrator.