aboutsummaryrefslogtreecommitdiff
path: root/src/triplet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/triplet.c')
-rw-r--r--src/triplet.c62
1 files changed, 2 insertions, 60 deletions
diff --git a/src/triplet.c b/src/triplet.c
index 92adf34..e41da07 100644
--- a/src/triplet.c
+++ b/src/triplet.c
@@ -336,6 +336,8 @@ remove_triplet(struct wy_triplet *trp, int check)
if (check) {
struct stat st;
+ if (wy_dry_run)
+ continue;
if (fstatat(trp->spool->source_fd,
trp->file[i].name, &st, 0)) {
if (errno == ENOENT)
@@ -397,66 +399,6 @@ triplet_commit(struct wy_triplet *trp)
timer_stop("spool");
}
-/* Process a single triplet from the table */
-static int
-triplet_processor(void *data, void *proc_data)
-{
- struct wy_triplet *trp = data;
- struct spool *spool = proc_data;
-
- if (trp->spool == spool) {
- wy_debug(1, ("FILE %s, DIST=%s, SIG=%s, DIRECTIVE=%s",
- trp->name,
- SP(trp->file[file_dist].name),
- SP(trp->file[file_signature].name),
- SP(trp->file[file_directive].name)));
-
- switch (check_triplet_state(trp)) {
- case triplet_directive:
- case triplet_complete:
- wy_debug(1, (_("processing triplet `%s'"), trp->name));
- if (process_directives(trp))
- remove_triplet(trp, 0);
- return 0;
-
- case triplet_incomplete:
- wy_debug(1, (_("%s: incomplete triplet"), trp->name));
- /* ignore unless expired (see below); */
- increase_stat_counter(WY_STAT_INCOMPLETE_TRIPLETS);
- break;
-
- case triplet_bad:
- increase_stat_counter(WY_STAT_BAD_TRIPLETS);
- remove_triplet(trp, 0);
- return 0;
- }
-
- if (triplet_expired_p(trp)) {
- increase_stat_counter(WY_STAT_EXPIRED_TRIPLETS);
- remove_triplet(trp, 0);
- }
- }
- return 0;
-}
-
-/* Process all triplets from the table according to the SPOOL */
-void
-spool_commit_triplets(struct spool *spool)
-{
- wy_debug(1, (_("processing spool %s (%s)"),
- spool->tag, wy_url_printable(spool->dest_url)));
- if (triplet_table) {
- if (spool_open_dictionaries(spool) == 0)
- grecs_symtab_foreach(triplet_table, triplet_processor, spool);
- }
-}
-
-size_t
-count_collected_triplets()
-{
- return triplet_table ? grecs_symtab_count(triplet_table) : 0;
-}
-
void
triplet_remove_file(struct spool *spool, const char *name)
{

Return to:

Send suggestions and report system problems to the System administrator.