diff options
author | Andreas Schneider <asn@samba.org> | 2011-02-21 17:55:52 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-02-21 23:00:02 +0100 |
commit | 59f7bcbc39cc412137b63b743ac19f11d4639b26 (patch) | |
tree | 8479c9c12542f4871c2d0299a5b6e37c088c950a | |
parent | debd6da27a78620053fb380dfc446de4714c3d0a (diff) | |
download | samba-59f7bcbc39cc412137b63b743ac19f11d4639b26.tar.gz samba-59f7bcbc39cc412137b63b743ac19f11d4639b26.tar.bz2 samba-59f7bcbc39cc412137b63b743ac19f11d4639b26.zip |
s3-librpc: Only register NCACN_NP.
This is the only transport we support at the moment.
-rw-r--r-- | source3/librpc/rpc/dcerpc_ep.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c index cfbe0ab1fd..37d69b0326 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); |