diff options
author | Volker Lendecke <vl@samba.org> | 2012-05-24 13:49:26 +0200 |
---|---|---|
committer | Kai Blin <kai@samba.org> | 2012-05-30 00:37:56 +0200 |
commit | 54cde76e376b7e6a781ff2841234d7f37eb6ea93 (patch) | |
tree | c535eef5ff75e400954a3779bbc6ce4f76509506 /lib/util/tevent_werror.c | |
parent | 6cdbce266b6ecccf181429949104df700d58351c (diff) | |
download | samba-54cde76e376b7e6a781ff2841234d7f37eb6ea93.tar.gz samba-54cde76e376b7e6a781ff2841234d7f37eb6ea93.tar.bz2 samba-54cde76e376b7e6a781ff2841234d7f37eb6ea93.zip |
lib: add tevent_req_poll_werror
Signed-off-by: Kai Blin <kai@samba.org>
Diffstat (limited to 'lib/util/tevent_werror.c')
-rw-r--r-- | lib/util/tevent_werror.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/util/tevent_werror.c b/lib/util/tevent_werror.c index d8956b398f..47bd809cbc 100644 --- a/lib/util/tevent_werror.c +++ b/lib/util/tevent_werror.c @@ -19,6 +19,7 @@ #include "../replace/replace.h" #include "tevent_werror.h" +#include "libcli/util/error.h" bool _tevent_req_werror(struct tevent_req *req, WERROR werror, @@ -79,3 +80,15 @@ void tevent_req_simple_finish_werror(struct tevent_req *subreq, } tevent_req_done(req); } + +bool tevent_req_poll_werror(struct tevent_req *req, + struct tevent_context *ev, + WERROR *err) +{ + bool ret = tevent_req_poll(req, ev); + if (!ret) { + NTSTATUS status = map_nt_error_from_unix_common(errno); + *err = ntstatus_to_werror(status); + } + return ret; +} |