From c25b5b35794624b28a8b1dd6ab63a35b6dd5f789 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 11 Mar 2014 08:49:07 +0100 Subject: [PATCH] librpc/rpc: finally maintain only the object guid This has nothing to do with ndr_syntax_id... Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- librpc/rpc/binding.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c index 27ea4c62029..37e0c4f54f6 100644 --- a/librpc/rpc/binding.c +++ b/librpc/rpc/binding.c @@ -37,7 +37,7 @@ struct dcerpc_binding { enum dcerpc_transport_t transport; - struct ndr_syntax_id object; + struct GUID object; const char *object_string; const char *host; const char *target_hostname; @@ -224,10 +224,10 @@ _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_bi } } - if (!GUID_all_zero(&b->object.uuid)) { + if (!GUID_all_zero(&b->object)) { o = s; s = talloc_asprintf_append_buffer(s, "%s@", - GUID_string(mem_ctx, &b->object.uuid)); + GUID_string(mem_ctx, &b->object)); if (s == NULL) { talloc_free(o); return NULL; @@ -500,7 +500,7 @@ _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *_s, stru _PUBLIC_ struct GUID dcerpc_binding_get_object(const struct dcerpc_binding *b) { - return b->object.uuid; + return b->object; } _PUBLIC_ NTSTATUS dcerpc_binding_set_object(struct dcerpc_binding *b, @@ -522,8 +522,7 @@ _PUBLIC_ NTSTATUS dcerpc_binding_set_object(struct dcerpc_binding *b, } talloc_free(tmp); - ZERO_STRUCT(b->object); - b->object.uuid = object; + b->object = object; return NT_STATUS_OK; }