summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/util/tevent_unix.c13
-rw-r--r--lib/util/tevent_unix.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/util/tevent_unix.c b/lib/util/tevent_unix.c
index e4c960e4d3..ee7ec8a6fe 100644
--- a/lib/util/tevent_unix.c
+++ b/lib/util/tevent_unix.c
@@ -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;
+}
diff --git a/lib/util/tevent_unix.h b/lib/util/tevent_unix.h
index 377e976c39..c1b0eb4e3f 100644
--- a/lib/util/tevent_unix.h
+++ b/lib/util/tevent_unix.h
@@ -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