diff options
author | Yunchih Chen <yunchih.cat@gmail.com> | 2018-11-23 14:02:21 +0800 |
---|---|---|
committer | Yunchih Chen <yunchih.cat@gmail.com> | 2018-11-23 14:02:21 +0800 |
commit | f7074d5b66ab1872f3735eda1736e65c5cf40bc3 (patch) | |
tree | f8c8b69dbe44fa25800fe639209a925e7f235e8d /lib/collect.c | |
parent | c5b6d181707cade0785f84bbd2df17f8268f5a4a (diff) | |
download | nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.gz nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.tar.zst nfcollect-f7074d5b66ab1872f3735eda1736e65c5cf40bc3.zip |
Old unfinished modifications
Diffstat (limited to 'lib/collect.c')
-rw-r--r-- | lib/collect.c | 6 |
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); } /* |