diff options
author | Andreas Schneider <asn@samba.org> | 2011-07-01 14:39:58 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-08-01 08:50:35 +0200 |
commit | 02cdb65fc67954e3811349021563f496fc282f7b (patch) | |
tree | b95f4876944235f71dd67df02216ef26cb4f6d5d | |
parent | 9cc6f904240897c81caf78b2c228b776b553ce63 (diff) | |
download | samba-02cdb65fc67954e3811349021563f496fc282f7b.tar.gz samba-02cdb65fc67954e3811349021563f496fc282f7b.tar.bz2 samba-02cdb65fc67954e3811349021563f496fc282f7b.zip |
s3-librpc: Add dcerpc_binding_vector_replace_iface().
-rw-r--r-- | source3/librpc/rpc/dcerpc_ep.c | 15 | ||||
-rw-r--r-- | source3/librpc/rpc/dcerpc_ep.h | 12 |
2 files changed, 27 insertions, 0 deletions
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c index d73c43dc64..e734be3b2b 100644 --- a/source3/librpc/rpc/dcerpc_ep.c +++ b/source3/librpc/rpc/dcerpc_ep.c @@ -243,6 +243,21 @@ NTSTATUS dcerpc_binding_vector_add_unix(const struct ndr_interface_table *iface, return NT_STATUS_OK; } +NTSTATUS dcerpc_binding_vector_replace_iface(const struct ndr_interface_table *iface, + struct dcerpc_binding_vector *v) +{ + uint32_t i; + + for (i = 0; i < v->count; i++) { + struct dcerpc_binding *b; + + b = &(v->bindings[i]); + b->object = iface->syntax_id; + } + + return NT_STATUS_OK; +} + struct dcerpc_binding_vector *dcerpc_binding_vector_dup(TALLOC_CTX *mem_ctx, const struct dcerpc_binding_vector *bvec) { diff --git a/source3/librpc/rpc/dcerpc_ep.h b/source3/librpc/rpc/dcerpc_ep.h index c982ff853c..ba1e688e6c 100644 --- a/source3/librpc/rpc/dcerpc_ep.h +++ b/source3/librpc/rpc/dcerpc_ep.h @@ -95,6 +95,18 @@ NTSTATUS dcerpc_binding_vector_add_unix(const struct ndr_interface_table *iface, struct dcerpc_binding_vector *dcerpc_binding_vector_dup(TALLOC_CTX *mem_ctx, const struct dcerpc_binding_vector *bvec); +/** + * @brief Replace the interface of the bindings in the vector. + * + * @param[in] iface The new interface identifier to use. + * + * @param[in] v The binding vector to change. + * + * @return An NTSTATUS error code. + */ +NTSTATUS dcerpc_binding_vector_replace_iface(const struct ndr_interface_table *iface, + struct dcerpc_binding_vector *v); + NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface, uint16_t port, |