summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-27 10:34:04 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-01 16:11:51 +0100
commit20980eb7870cf3478d9e8e78fb412c5bd299cca5 (patch)
tree87d04f35038b7ea1627cabb97b27495fe5d65f6e /pidl/lib/Parse/Pidl
parent1a64d3cbc65b70df1f1b3f473cdbfdce5c8f2ae9 (diff)
downloadsamba-20980eb7870cf3478d9e8e78fb412c5bd299cca5.tar.gz
samba-20980eb7870cf3478d9e8e78fb412c5bd299cca5.tar.bz2
samba-20980eb7870cf3478d9e8e78fb412c5bd299cca5.zip
pidl:NDR/Client.pm: generate explicit _recv functions
metze
Diffstat (limited to 'pidl/lib/Parse/Pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm32
1 files changed, 32 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index 9d3ccaf8c8..958f215a2e 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -43,6 +43,37 @@ sub ParseFunctionSend($$$)
$res .= "}\n\n";
}
+sub ParseFunctionRecv($$$)
+{
+ my ($interface, $fn, $name) = @_;
+ my $uname = uc $name;
+
+ my $proto = "NTSTATUS dcerpc_$name\_recv(struct rpc_request *rreq)";
+
+ $res_hdr .= "\n$proto;\n";
+
+ $res .= "$proto\n{\n";
+
+ if (has_property($fn, "todo")) {
+ $res .= "\treturn NT_STATUS_NOT_IMPLEMENTED;\n";
+ } else {
+ $res .= "NTSTATUS status;
+ struct dcerpc_pipe *p = rreq->p;
+ struct $name *r = (struct $name *)rreq->ndr.struct_ptr;
+
+ status = dcerpc_ndr_request_recv(rreq);
+
+ if (NT_STATUS_IS_OK(status) && (p->conn->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG($name, r);
+ }
+
+ return status;
+";
+ }
+
+ $res .= "}\n\n";
+}
+
sub ParseFunctionSync($$$)
{
my ($interface, $fn, $name) = @_;
@@ -90,6 +121,7 @@ sub ParseFunction($$)
my ($interface, $fn) = @_;
ParseFunctionSend($interface, $fn, $fn->{NAME});
+ ParseFunctionRecv($interface, $fn, $fn->{NAME});
ParseFunctionSync($interface, $fn, $fn->{NAME});
}