aboutsummaryrefslogtreecommitdiffstats
path: root/lib/collect.c
diff options
context:
space:
mode:
authorYunchih Chen <yunchih.cat@gmail.com>2018-11-23 14:02:21 +0800
committerYunchih Chen <yunchih.cat@gmail.com>2018-11-23 14:02:21 +0800
commitf7074d5b66ab1872f3735eda1736e65c5cf40bc3 (patch)
treef8c8b69dbe44fa25800fe639209a925e7f235e8d /lib/collect.c
parentc5b6d181707cade0785f84bbd2df17f8268f5a4a (diff)
downloadnfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar
nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.gz
nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.bz2
nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.lz
nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.xz
nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.zst
nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.zip
Old unfinished modifications
Diffstat (limited to 'lib/collect.c')
-rw-r--r--lib/collect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/collect.c b/lib/collect.c
index c69c9a9..bc32a93 100644
--- a/lib/collect.c
+++ b/lib/collect.c
@@ -221,12 +221,12 @@ static void *nfl_start_commit_worker(void *targs) {
nfl_state_t *nf = (nfl_state_t *)targs;
const char *filename = nfl_get_filename(g.storage_dir, nf->header->id);
debug("Comm worker #%u: thread started.", nf->header->id);
- /* FIXME */
+ /* truncate ? */
bool truncate = true;
sem_wait(g.nfl_commit_queue);
debug("Comm worker #%u: commit started.", nf->header->id);
- nfl_commit_worker(nf->header, nf->store, g.compression_opt, truncate, filename);
+ int ret = nfl_commit_worker(nf->header, nf->store, g.compression_opt, truncate, filename);
debug("Comm worker #%u: commit done.", nf->header->id);
sem_post(g.nfl_commit_queue);
@@ -238,7 +238,7 @@ static void *nfl_start_commit_worker(void *targs) {
pthread_cond_signal(&nf->has_finished_recv_cond);
pthread_mutex_unlock(&nf->has_finished_recv_lock);
- pthread_exit(NULL);
+ pthread_exit(ret);
}
/*