From f7074d5b66ab1872f3735eda1736e65c5cf40bc3 Mon Sep 17 00:00:00 2001 From: Yunchih Chen Date: Fri, 23 Nov 2018 14:02:21 +0800 Subject: Old unfinished modifications --- lib/collect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/collect.c') 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); } /* -- cgit v1.2.3