summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-01-09 21:35:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:35 -0500
commit1b1b678cc8c79dacc3b80de4f8203154d47c0345 (patch)
tree91a0bea56f16740a41ff64ba95914c4c06f89b11 /source4/build
parent1303f51099c2054c3966c6ba34490c5ffad85c13 (diff)
downloadsamba-1b1b678cc8c79dacc3b80de4f8203154d47c0345.tar.gz
samba-1b1b678cc8c79dacc3b80de4f8203154d47c0345.tar.bz2
samba-1b1b678cc8c79dacc3b80de4f8203154d47c0345.zip
r4624: Several crash fixes for DCOM
More work on the example class implementation (This used to be commit 1f8f4dd179d5aa0472c676d115dc2fc1749ce32d)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/proxy.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/build/pidl/proxy.pm b/source4/build/pidl/proxy.pm
index a09a8be5d4..1eef131a6c 100644
--- a/source4/build/pidl/proxy.pm
+++ b/source4/build/pidl/proxy.pm
@@ -139,7 +139,14 @@ static NTSTATUS dcom_proxy_$interface->{NAME}_$name(struct dcom_interface_p *d,
$res .="
NTSTATUS dcom_$interface->{NAME}_$name (struct dcom_interface_p *d, TALLOC_CTX *mem_ctx, struct $name *r)
{
- return ((const struct dcom_$interface->{NAME}_vtable *)d->vtable)->$name (d, mem_ctx, r);
+ const struct dcom_$interface->{NAME}_vtable *table = d->vtable;
+
+ if (table->$name == NULL) {
+ DEBUG(0, (\"Object does not implement $name of interface $interface->{NAME}\\n\"));
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+
+ return table->$name (d, mem_ctx, r);
}
";
}
@@ -151,7 +158,7 @@ sub ParseInterface($)
{
my($interface) = shift;
my($data) = $interface->{DATA};
- $res = "/* DCOM stubs generated by pidl */\n\n";
+ $res = "/* DCOM proxy generated by pidl */\n\n";
foreach my $d (@{$data}) {
($d->{TYPE} eq "FUNCTION") &&
ParseFunction($interface, $d);