diff options
Diffstat (limited to 'source4/lib/dcom/common')
-rw-r--r-- | source4/lib/dcom/common/main.c | 8 | ||||
-rw-r--r-- | source4/lib/dcom/common/tables.c | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c index b9f6127c6c..48b5ec946b 100644 --- a/source4/lib/dcom/common/main.c +++ b/source4/lib/dcom/common/main.c @@ -549,9 +549,15 @@ HYPER_T dcom_get_current_oxid(void) return getpid(); } -struct dcom_interface_p *dcom_new_local_ifacep(struct dcom_context *ctx, const struct dcom_interface *iface, void *vtable, struct dcom_object *object) +struct dcom_interface_p *dcom_new_local_ifacep(struct dcom_context *ctx, const struct GUID *iid, void *vtable, struct dcom_object *object) { struct dcom_interface_p *ip = talloc_p(ctx, struct dcom_interface_p); + const struct dcom_interface *iface = dcom_interface_by_iid(iid); + + if (!iface) { + DEBUG (1, ("Unable to find interface with IID %s\n", GUID_string(ctx, iid))); + return NULL; + } ip->ctx = ctx; ip->interface = iface; diff --git a/source4/lib/dcom/common/tables.c b/source4/lib/dcom/common/tables.c index faf67710e0..8a764d0a65 100644 --- a/source4/lib/dcom/common/tables.c +++ b/source4/lib/dcom/common/tables.c @@ -77,7 +77,12 @@ NTSTATUS dcom_register_interface(const void *_iface) { const struct dcom_interface *iface = _iface; struct interface_list *l; + TALLOC_CTX *lcl_ctx = talloc_init("dcom_register_interface"); + DEBUG(5, ("Adding DCOM interface %s\n", GUID_string(lcl_ctx, &iface->iid))); + + talloc_destroy(lcl_ctx); + l = talloc_zero_p(interfaces?interfaces:talloc_autofree_context(), struct interface_list); |