From: Andreas Schneider Date: Mon, 21 Feb 2011 16:55:52 +0000 (+0100) Subject: s3-librpc: Only register NCACN_NP. X-Git-Tag: tevent-0.9.11~432 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59f7bcbc39cc412137b63b743ac19f11d4639b26;p=thirdparty%2Fsamba.git s3-librpc: Only register NCACN_NP. This is the only transport we support at the moment. --- diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c index cfbe0ab1fde..37d69b0326d 100644 --- a/source3/librpc/rpc/dcerpc_ep.c +++ b/source3/librpc/rpc/dcerpc_ep.c @@ -29,7 +29,9 @@ NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx, struct dcerpc_binding_vector **pbvec) { struct dcerpc_binding_vector *bvec; - uint32_t ep_count, i; + uint32_t ep_count; + uint32_t count = 0; + uint32_t i; NTSTATUS status; TALLOC_CTX *tmp_ctx; @@ -68,17 +70,28 @@ NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx, } b->object = iface->syntax_id; - if (b->transport == NCACN_NP) { - b->host = talloc_asprintf(b, "\\\\%s", global_myname()); - if (b->host == NULL) { - status = NT_STATUS_NO_MEMORY; - goto done; - } + + switch (b->transport) { + case NCACN_NP: + b->host = talloc_asprintf(b, "\\\\%s", global_myname()); + if (b->host == NULL) { + status = NT_STATUS_NO_MEMORY; + goto done; + } + break; + case NCACN_IP_TCP: + /* TODO */ + case NCALRPC: + /* TODO */ + default: + continue; } - bvec->bindings[i] = *b; + bvec->bindings[count] = *b; + count++; } - bvec->count = ep_count; + + bvec->count = count; *pbvec = talloc_move(mem_ctx, &bvec);