aboutsummaryrefslogtreecommitdiff
path: root/src/triplet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/triplet.c')
-rw-r--r--src/triplet.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/triplet.c b/src/triplet.c
index 0744daa..efe4a0b 100644
--- a/src/triplet.c
+++ b/src/triplet.c
@@ -60,7 +60,7 @@ hash_triplet_free (void *data)
/* Register a file in the triplet table */
void
-register_file (struct file_info *finfo)
+register_file (struct file_info *finfo, const struct spool *spool)
{
struct file_triplet *tp, *ret;
@@ -69,7 +69,8 @@ register_file (struct file_info *finfo)
tp->name = (char*)(tp + 1);
memcpy (tp->name, finfo->name, finfo->root_len);
tp->name[finfo->root_len] = 0;
-
+ tp->spool = spool;
+
if (! ((triplet_table
|| (triplet_table = hash_initialize (0, 0,
hash_triplet_hasher,
@@ -123,7 +124,7 @@ check_triplet_state (struct file_triplet *trp)
{
if (trp->file[file_directive].name)
{
- if (verify_directive_file (trp, trp->spool))
+ if (verify_directive_file (trp))
return triplet_bad;
if (trp->file[file_dist].name == 0
@@ -176,9 +177,6 @@ static bool
triplet_processor (void *data, void *proc_data)
{
struct file_triplet *trp = data;
- const struct spool *spool = proc_data;
-
- trp->spool = spool;
if (debug_level)
logmsg (LOG_DEBUG, "FILE %s, DIST=%s, SIG=%s, DIRECTIVE=%s",
@@ -193,7 +191,7 @@ triplet_processor (void *data, void *proc_data)
case triplet_complete:
if (debug_level)
logmsg (LOG_DEBUG, _("processing triplet `%s'"), trp->name);
- if (process_directives (trp, spool))
+ if (process_directives (trp))
remove_triplet (trp);
return true;
@@ -210,7 +208,7 @@ triplet_processor (void *data, void *proc_data)
return true;
}
- if (triplet_expired_p (trp, spool->file_sweep_time))
+ if (triplet_expired_p (trp, trp->spool->file_sweep_time))
{
UPDATE_STATS (STAT_EXPIRED_TRIPLETS);
remove_triplet (trp);
@@ -228,7 +226,7 @@ enumerate_triplets (const struct spool *spool)
spool->tag, mu_url_to_string (spool->dest_url));
if (triplet_table)
{
- hash_do_for_each (triplet_table, triplet_processor, (void*) spool);
+ hash_do_for_each (triplet_table, triplet_processor, NULL);
hash_clear (triplet_table);
}
}

Return to:

Send suggestions and report system problems to the System administrator.