diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-06 21:43:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:59 -0500 |
commit | 77ec3f684dc8563965ae5118ef5549925ea81d0f (patch) | |
tree | 6069494061404ddf873fdfcdfe82d86267c2e1b3 /source4/build | |
parent | ffae01d432c715961c44e499258ee2a9f7e3d5f1 (diff) | |
download | samba-77ec3f684dc8563965ae5118ef5549925ea81d0f.tar.gz samba-77ec3f684dc8563965ae5118ef5549925ea81d0f.tar.bz2 samba-77ec3f684dc8563965ae5118ef5549925ea81d0f.zip |
r5674: - Re-enable DCOM support.
- Always put IID in vtables (useful for asserts)
- Add table to keep track of DCOM proxy classes
- Bunch of smaller bug fixes
(This used to be commit 26d5a0b92c66bc86d0c26f687f83fa712342ac32)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/com_header.pm | 1 | ||||
-rw-r--r-- | source4/build/pidl/dcom_proxy.pm | 30 | ||||
-rw-r--r-- | source4/build/smb_build/main.pm | 1 |
3 files changed, 20 insertions, 12 deletions
diff --git a/source4/build/pidl/com_header.pm b/source4/build/pidl/com_header.pm index 18df78f90d..1c7194d85c 100644 --- a/source4/build/pidl/com_header.pm +++ b/source4/build/pidl/com_header.pm @@ -65,6 +65,7 @@ sub HeaderVTable($) } $res .= "\n"; $res .= "struct $interface->{NAME}_vtable {\n"; + $res .= "\tstruct GUID iid;\n"; $res .= "\t" . uc($interface->{NAME}) . "_METHODS\n"; $res .= "};\n\n"; diff --git a/source4/build/pidl/dcom_proxy.pm b/source4/build/pidl/dcom_proxy.pm index 1a1b8de064..8cc5547680 100644 --- a/source4/build/pidl/dcom_proxy.pm +++ b/source4/build/pidl/dcom_proxy.pm @@ -43,8 +43,8 @@ sub ParseRegFunc($) $res .= "static NTSTATUS dcom_proxy_$interface->{NAME}_init(void) { struct GUID base_iid; - struct GUID iid; - struct $interface->{NAME}_vtable proxy_vtable;"; + struct $interface->{NAME}_vtable *proxy_vtable = talloc(talloc_autofree_context(), struct $interface->{NAME}_vtable); +"; if (defined($interface->{BASE})) { $res.= " @@ -54,7 +54,7 @@ sub ParseRegFunc($) base_vtable = dcom_proxy_vtable_by_iid(&base_iid); if (base_vtable == NULL) { - DEBUG(0, (\"No proxy registered for base interface\n\")); + DEBUG(0, (\"No proxy registered for base interface '$interface->{BASE}'\\n\")); return NT_STATUS_FOOBAR; } @@ -69,9 +69,9 @@ sub ParseRegFunc($) } $res.= " - GUID_from_string(DCERPC_" . (uc $interface->{NAME}) . "_UUID, &iid); + GUID_from_string(DCERPC_" . (uc $interface->{NAME}) . "_UUID, &proxy_vtable.iid); - return dcom_register_proxy(&iid, &proxy_vtable); + return dcom_register_proxy(&proxy_vtable); }\n\n"; } @@ -102,10 +102,13 @@ static $fn->{RETURN_TYPE} dcom_proxy_$interface->{NAME}_$name(struct $interface- "; # Put arguments into r - foreach my $a (@{$fn->{DATA}}) { - next if ($a->{NAME} eq "ORPCthis"); + foreach my $a (@{$fn->{ELEMENTS}}) { next unless (util::has_property($a, "in")); - $res .= "\tr.in.$a->{NAME} = $a->{NAME};\n"; + if (typelist::typeIs($a->{TYPE}, "INTERFACE")) { + $res .="\tNDR_CHECK(dcom_OBJREF_from_IUnknown(&r.in.$a->{NAME}.obj, $a->{NAME}));\n"; + } else { + $res .= "\tr.in.$a->{NAME} = $a->{NAME};\n"; + } } $res .=" @@ -122,10 +125,15 @@ static $fn->{RETURN_TYPE} dcom_proxy_$interface->{NAME}_$name(struct $interface- "; # Put r info back into arguments - foreach my $a (@{$fn->{DATA}}) { - next if ($a->{NAME} eq "ORPCthat"); + foreach my $a (@{$fn->{ELEMENTS}}) { next unless (util::has_property($a, "out")); - $res .= "\t*$a->{NAME} = r.out.$a->{NAME};\n"; + + if (typelist::typeIs($a->{TYPE}, "INTERFACE")) { + $res .="\tNDR_CHECK(dcom_IUnknown_from_OBJREF(d->ctx, &$a->{NAME}, r.out.$a->{NAME}.obj));\n"; + } else { + $res .= "\t*$a->{NAME} = r.out.$a->{NAME};\n"; + } + } if ($fn->{RETURN_TYPE} eq "NTSTATUS") { diff --git a/source4/build/smb_build/main.pm b/source4/build/smb_build/main.pm index c401bc8de6..b6e29a7ace 100644 --- a/source4/build/smb_build/main.pm +++ b/source4/build/smb_build/main.pm @@ -57,7 +57,6 @@ sub smb_build_main($) "libcli/libsmb.mk", "libcli/config.mk", "libcli/security/config.mk", - "lib/dcom/config.mk", "lib/com/config.mk", "scripting/swig/config.mk", ); |