From 965633a5b4c93e34723f753a807ef0cc77f916fa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Sep 2006 16:29:14 +0000 Subject: r18482: Fix a couple of small issues in the generated server code. (This used to be commit ddfe3c54439eb76327608e04df9381621ab875b8) --- source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 47e18fee69..9ecd7d1e83 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -60,10 +60,10 @@ sub ParseFunction($$) my $ret = "_$fn->{NAME}(p"; foreach (@{$fn->{ELEMENTS}}) { my @dir = @{$_->{DIRECTION}}; - if (grep(@dir, /in/) and grep(@dir, /out/)) { + if (grep(/in/, @dir) and grep(/out/, @dir)) { pidl "r.out.$_->{NAME} = r.in.$_->{NAME};"; } - if (grep(@dir, /in/)) { $ret .= ", r.in.$_->{NAME}"; } + if (grep(/in/, @dir)) { $ret .= ", r.in.$_->{NAME}"; } else { $ret .= ", r.out.$_->{NAME}"; } $proto .= ", " . DeclLong($_); @@ -95,7 +95,7 @@ sub ParseFunction($$) pidl "}"; pidl ""; pidl "blob = ndr_push_blob(push);"; - pidl "if (!prs_init_data_blob(&p->in_data.rdata, &blob, p->mem_ctx)) {"; + pidl "if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {"; pidl "\ttalloc_free(mem_ctx);"; pidl "\treturn False;"; pidl "}"; -- cgit