git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcd82a9
)
pidl: Fix samba3-cli test after Günthers formatting fixes.
author
Jelmer Vernooij
<jelmer@samba.org>
Thu, 10 Jan 2008 19:38:14 +0000
(20:38 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Thu, 10 Jan 2008 19:38:14 +0000
(20:38 +0100)
source/pidl/tests/samba3-cli.pl
patch
|
blob
|
history
diff --git
a/source/pidl/tests/samba3-cli.pl
b/source/pidl/tests/samba3-cli.pl
index 5086300e46e0a2d01e4190798d3ee6b50ec8b1c4..1b2a3c97854f7b5c59b14aa3b1a35f9067dd7b5b 100755
(executable)
--- a/
source/pidl/tests/samba3-cli.pl
+++ b/
source/pidl/tests/samba3-cli.pl
@@
-29,31
+29,40
@@
my $x = new Parse::Pidl::Samba3::ClientNDR();
$fn = { NAME => "bar", ELEMENTS => [ ] };
$x->ParseFunction("foo", $fn);
$fn = { NAME => "bar", ELEMENTS => [ ] };
$x->ParseFunction("foo", $fn);
-is($x->{res}, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+is($x->{res},
+"NTSTATUS rpccli_bar(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx)
{
\tstruct bar r;
\tNTSTATUS status;
{
\tstruct bar r;
\tNTSTATUS status;
-\t
+
\t/* In parameters */
\t/* In parameters */
-\t
-\tif (DEBUGLEVEL >= 10)
+
+\tif (DEBUGLEVEL >= 10)
{
\t\tNDR_PRINT_IN_DEBUG(bar, &r);
\t\tNDR_PRINT_IN_DEBUG(bar, &r);
-\t
-\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_FOO, &ndr_table_foo, NDR_BAR, &r);
-\t
+\t}
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_FOO,
+ &ndr_table_foo,
+ NDR_BAR,
+ &r);
+
\tif (!NT_STATUS_IS_OK(status)) {
\t\treturn status;
\t}
\tif (!NT_STATUS_IS_OK(status)) {
\t\treturn status;
\t}
-\t
-\tif (DEBUGLEVEL >= 10)
+
+\tif (DEBUGLEVEL >= 10)
{
\t\tNDR_PRINT_OUT_DEBUG(bar, &r);
\t\tNDR_PRINT_OUT_DEBUG(bar, &r);
-\t
+\t}
+
\tif (NT_STATUS_IS_ERR(status)) {
\t\treturn status;
\t}
\tif (NT_STATUS_IS_ERR(status)) {
\t\treturn status;
\t}
-\t
+
\t/* Return variables */
\t/* Return variables */
-\t
+
\t/* Return result */
\treturn NT_STATUS_OK;
}
\t/* Return result */
\treturn NT_STATUS_OK;
}
@@
-64,36
+73,46
@@
$x = new Parse::Pidl::Samba3::ClientNDR();
$fn = { NAME => "bar", ELEMENTS => [ ], RETURN_TYPE => "WERROR" };
$x->ParseFunction("foo", $fn);
$fn = { NAME => "bar", ELEMENTS => [ ], RETURN_TYPE => "WERROR" };
$x->ParseFunction("foo", $fn);
-is($x->{res}, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror)
+is($x->{res},
+"NTSTATUS rpccli_bar(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
{
\tstruct bar r;
\tNTSTATUS status;
{
\tstruct bar r;
\tNTSTATUS status;
-\t
+
\t/* In parameters */
\t/* In parameters */
-\t
-\tif (DEBUGLEVEL >= 10)
+
+\tif (DEBUGLEVEL >= 10)
{
\t\tNDR_PRINT_IN_DEBUG(bar, &r);
\t\tNDR_PRINT_IN_DEBUG(bar, &r);
-\t
-\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_FOO, &ndr_table_foo, NDR_BAR, &r);
-\t
+\t}
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_FOO,
+ &ndr_table_foo,
+ NDR_BAR,
+ &r);
+
\tif (!NT_STATUS_IS_OK(status)) {
\t\treturn status;
\t}
\tif (!NT_STATUS_IS_OK(status)) {
\t\treturn status;
\t}
-\t
-\tif (DEBUGLEVEL >= 10)
+
+\tif (DEBUGLEVEL >= 10)
{
\t\tNDR_PRINT_OUT_DEBUG(bar, &r);
\t\tNDR_PRINT_OUT_DEBUG(bar, &r);
-\t
+\t}
+
\tif (NT_STATUS_IS_ERR(status)) {
\t\treturn status;
\t}
\tif (NT_STATUS_IS_ERR(status)) {
\t\treturn status;
\t}
-\t
+
\t/* Return variables */
\t/* Return variables */
-\t
+
\t/* Return result */
\tif (werror) {
\t\t*werror = r.out.result;
\t}
\t/* Return result */
\tif (werror) {
\t\t*werror = r.out.result;
\t}
-\t
+
\treturn werror_to_ntstatus(r.out.result);
}
\treturn werror_to_ntstatus(r.out.result);
}