From d658de65d32e6746ac51aeb4da7aa74b3da40c2b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 16:22:35 +0000 Subject: r12512: Use GUID structs in API functions everywhere rather then converting back and forth between GUID structs and strings in several places. (This used to be commit 3564e2f967ef72d6301b4f7e9a311cebcded4d75) --- source4/lib/com/dcom/main.c | 7 ++----- source4/lib/messaging/messaging.c | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/com/dcom/main.c b/source4/lib/com/dcom/main.c index 4a3dde86ec..bfa41f9ef6 100644 --- a/source4/lib/com/dcom/main.c +++ b/source4/lib/com/dcom/main.c @@ -262,7 +262,6 @@ NTSTATUS dcom_get_pipe(struct IUnknown *iface, struct dcerpc_pipe **pp) int i; struct dcerpc_pipe *p; TALLOC_CTX *tmp_ctx; - const char *uuid; struct dcom_object_exporter *ox; ox = object_exporter_by_ip(iface->ctx, iface); @@ -273,8 +272,6 @@ NTSTATUS dcom_get_pipe(struct IUnknown *iface, struct dcerpc_pipe **pp) iid = iface->vtable->iid; - uuid = GUID_string(tmp_ctx, &iid); - if (p) { if (!GUID_equal(&p->syntax.uuid, &iid)) { struct dcerpc_pipe *p2; @@ -282,7 +279,7 @@ NTSTATUS dcom_get_pipe(struct IUnknown *iface, struct dcerpc_pipe **pp) /* interface will always be present, so * idl_iface_by_uuid can't return NULL */ - status = dcerpc_secondary_context(p, &p2, idl_iface_by_uuid(uuid)); + status = dcerpc_secondary_context(p, &p2, idl_iface_by_uuid(&iid)); if (NT_STATUS_IS_OK(status)) { p = p2; @@ -303,7 +300,7 @@ NTSTATUS dcom_get_pipe(struct IUnknown *iface, struct dcerpc_pipe **pp) DEBUG(1, ("Error parsing string binding")); } else { status = dcerpc_pipe_connect_b(NULL, &p, binding, - idl_iface_by_uuid(uuid), + idl_iface_by_uuid(&iid), iface->ctx->dcom->credentials, iface->ctx->event_ctx); } diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 06eed05404..e3ad8e7e25 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -479,7 +479,7 @@ NTSTATUS irpc_register(struct messaging_context *msg_ctx, irpc->callnum = callnum; irpc->fn = fn; irpc->private = private; - GUID_from_string(irpc->table->uuid, &irpc->uuid); + irpc->uuid = irpc->table->uuid; return NT_STATUS_OK; } @@ -689,8 +689,7 @@ struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx, talloc_set_destructor(irpc, irpc_destructor); /* setup the header */ - status = GUID_from_string(table->uuid, &header.uuid); - if (!NT_STATUS_IS_OK(status)) goto failed; + header.uuid = table->uuid; header.if_version = table->if_version; header.callid = irpc->callid; -- cgit