lib: Add tevent_req_simple_recv_unix
[sfrench/samba-autobuild/.git] / lib / util / tevent_unix.c
index e4c960e4d36dc479f5b4522a506105716df812b9..ee7ec8a6fec89d382ade57a9292eae58e56419cb 100644 (file)
@@ -48,3 +48,16 @@ bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno)
        }
        return true;
 }
+
+int tevent_req_simple_recv_unix(struct tevent_req *req)
+{
+       int err = 0;
+
+       /*
+        * Ignore result of tevent_req_is_unix_error, we're only interested in
+        * the status
+        */
+       tevent_req_is_unix_error(req, &err);
+       tevent_req_received(req);
+       return err;
+}