]> git.ipfire.org Git - thirdparty/FORT-validator.git/commit
Fix rsync and thread pool bugs. 1.5.0 v1.5.0
authorpcarana <pc.moreno2099@gmail.com>
Wed, 27 Jan 2021 15:32:18 +0000 (09:32 -0600)
committerpcarana <pc.moreno2099@gmail.com>
Wed, 27 Jan 2021 15:32:18 +0000 (09:32 -0600)
commitf74278a1c53704fabeb83fd19a22d21cd708579a
tree963d55e6a882251f1bbda6a439cee09f51878d1a
parentc64825979116f7c57e83bdf6a4d24b8b2220625d
Fix rsync and thread pool bugs.

+Mistakenly (of course, it was a bug) the returned value from rsync execution was being confused with the returned value from execvp call. The main problem was when rsync returned a code 12 (Error in rsync protocol data stream); in that case, the caller confused that error with ENOMEM (also with value 12), which led to terminate execution.
+The thread pool wait function wasn't considering pending taks at the queue; also the poll function was holding and releasing the mutex more than it was needed, and the thread attributes are now globally initialized (thanks @ydahhrk for the code review).
+Increment the number of threads at the internal pool to 10.
src/internal_pool.c
src/rsync/rsync.c
src/thread/thread_pool.c