pidl:NDR/Client: simplify tevent_req_nterror() usage
authorStefan Metzmacher <metze@samba.org>
Fri, 30 Aug 2013 06:54:10 +0000 (08:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jan 2014 07:37:37 +0000 (08:37 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm

index 17b25b867598443edb04818d50281653a25ce309..06cc65a2a618a688f8c72e930e039ff09aeda496 100644 (file)
@@ -159,9 +159,8 @@ sub ParseFunction_r_Done($$$$)
 
        $self->pidl("status = dcerpc_binding_handle_call_recv(subreq);");
        $self->pidl("TALLOC_FREE(subreq);");
-       $self->pidl("if (!NT_STATUS_IS_OK(status)) {");
+       $self->pidl("if (tevent_req_nterror(req, status)) {");
        $self->indent;
-       $self->pidl("tevent_req_nterror(req, status);");
        $self->pidl("return;");
        $self->deindent;
        $self->pidl("}");
@@ -564,9 +563,8 @@ sub ParseFunction_Done($$$$)
 
        $self->pidl("status = dcerpc_$name\_r_recv(subreq, mem_ctx);");
        $self->pidl("TALLOC_FREE(subreq);");
-       $self->pidl("if (!NT_STATUS_IS_OK(status)) {");
+       $self->pidl("if (tevent_req_nterror(req, status)) {");
        $self->indent;
-       $self->pidl("tevent_req_nterror(req, status);");
        $self->pidl("return;");
        $self->deindent;
        $self->pidl("}");