configure.ac: Fix mysql configuration
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index 4a4e46e..6cc58bb 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -150,7 +150,7 @@ void afs_init(void)
                afl[i].init(&afl[i]);
        }
        ms2tv(conf.announce_time_arg, &announce_tv);
-       PARA_INFO_LOG("announce timeval: %lu:%lu\n", announce_tv.tv_sec, announce_tv.tv_usec);
+       PARA_INFO_LOG("announce timeval: %lums\n", tv2ms(&announce_tv));
        for (i = 0; senders[i].name; i++) {
                PARA_NOTICE_LOG("initializing %s sender\n", senders[i].name);
                senders[i].init(&senders[i]);
@@ -452,6 +452,11 @@ void afs_send_chunk(void)
        afs_next_chunk_time(&due);
        if (tv_diff(&due, &now, NULL) > 0)
                return;
+       if (chk_barrier("eof", &now, &eof_barrier, &due, 1) < 0)
+               return;
+       if (chk_barrier("data send", &now, &data_send_barrier,
+                       &due, 1) < 0)
+               return;
        buf = af->read_chunk(mmd->current_chunk, &ret);
        mmd->new_afs_status_flags &= ~AFS_REPOS;
        if (!buf) {