pthreadpool: correctly handle pthreadpool_tevent_register_ev() failures
authorStefan Metzmacher <metze@samba.org>
Fri, 20 Apr 2018 13:05:44 +0000 (15:05 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Jul 2018 12:25:18 +0000 (14:25 +0200)
It returns errno values instead of setting 'errno'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/pthreadpool/pthreadpool_tevent.c

index 493083406ab02139fed8bc05cb89577a3d1bb006..b2292ef214c940e204e4ab091c8727f2840c6ae8 100644 (file)
@@ -289,8 +289,7 @@ struct tevent_req *pthreadpool_tevent_job_send(
        }
 
        ret = pthreadpool_tevent_register_ev(pool, ev);
-       if (ret != 0) {
-               tevent_req_error(req, errno);
+       if (tevent_req_error(req, ret)) {
                return tevent_req_post(req, ev);
        }