mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r26256: When generating Samba3 pidl output for WERROR based functions, make sure the
client caller can retrieve the WERROR.
Jelmer, no idea how to add a test for that...
Guenther
(This used to be commit cf55365177
)
This commit is contained in:
parent
cbdad76b0d
commit
ef792cc8a5
@ -46,6 +46,11 @@ sub ParseFunction($$$)
|
||||
foreach (@{$fn->{ELEMENTS}}) {
|
||||
$defargs .= ", " . DeclLong($_);
|
||||
}
|
||||
|
||||
if ($fn->{RETURN_TYPE} eq "WERROR") {
|
||||
$defargs .= ", WERROR *werror";
|
||||
}
|
||||
|
||||
$self->fn_declare("NTSTATUS rpccli_$fn->{NAME}(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx$defargs)");
|
||||
$self->pidl("{");
|
||||
$self->indent;
|
||||
@ -123,6 +128,12 @@ sub ParseFunction($$$)
|
||||
} elsif ($fn->{RETURN_TYPE} eq "NTSTATUS") {
|
||||
$self->pidl("return r.out.result;");
|
||||
} elsif ($fn->{RETURN_TYPE} eq "WERROR") {
|
||||
$self->pidl("if (werror) {");
|
||||
$self->indent;
|
||||
$self->pidl("*werror = r.out.result;");
|
||||
$self->deindent;
|
||||
$self->pidl("}");
|
||||
$self->pidl("");
|
||||
$self->pidl("return werror_to_ntstatus(r.out.result);");
|
||||
} else {
|
||||
warning($fn->{ORIGINAL}, "Unable to convert $fn->{RETURN_TYPE} to NTSTATUS");
|
||||
|
Loading…
Reference in New Issue
Block a user