lib: Add tevent_req_simple_recv_unix
authorVolker Lendecke <vl@samba.org>
Sat, 8 Nov 2014 09:00:31 +0000 (09:00 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 10 Nov 2014 05:09:04 +0000 (06:09 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/tevent_unix.c
lib/util/tevent_unix.h

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;
+}
index 377e976c390930a4cd1d8b1cfcae6ab62d6a0798..c1b0eb4e3ff8731313cda600652de4098963c745 100644 (file)
@@ -27,5 +27,6 @@
 #include <tevent.h>
 
 bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno);
+int tevent_req_simple_recv_unix(struct tevent_req *req);
 
 #endif