diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-10-21 17:40:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:02:23 -0500 |
commit | a9081b527b33d536ca36d61ad2f7f34a6e6e69e5 (patch) | |
tree | e4c2dd88bb9e0b65aea31e38bca7a86ae4d06c51 /source4/rpc_server/dcerpc_tcp.c | |
parent | f30a08813cbb9b7c50625ad3c2d8476a82e65d42 (diff) | |
download | samba-a9081b527b33d536ca36d61ad2f7f34a6e6e69e5.tar.gz samba-a9081b527b33d536ca36d61ad2f7f34a6e6e69e5.tar.bz2 samba-a9081b527b33d536ca36d61ad2f7f34a6e6e69e5.zip |
r3118: Eliminate struct dcesrv_ep_description and replace it with
struct dcerpc_binding.
(This used to be commit 2046e14cf8d010d4e715124859df2c1c3c782266)
Diffstat (limited to 'source4/rpc_server/dcerpc_tcp.c')
-rw-r--r-- | source4/rpc_server/dcerpc_tcp.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source4/rpc_server/dcerpc_tcp.c b/source4/rpc_server/dcerpc_tcp.c index ef05d74349..de8b5bc069 100644 --- a/source4/rpc_server/dcerpc_tcp.c +++ b/source4/rpc_server/dcerpc_tcp.c @@ -62,16 +62,29 @@ static void add_socket_rpc(struct server_service *service, char *ip_str = talloc_strdup(service, inet_ntoa(*ifip)); for (e=dce_ctx->endpoint_list;e;e=e->next) { - if (e->ep_description.type == NCACN_IP_TCP) { + if (e->ep_description.transport == NCACN_IP_TCP) { struct server_socket *sock; struct dcesrv_socket_context *dcesrv_sock; + uint16_t port = 0; + + if (e->ep_description.options && e->ep_description.options[0]) + port = atoi(e->ep_description.options[0]); - sock = service_setup_socket(service,model_ops, ip_str, &e->ep_description.info.tcp_port); + sock = service_setup_socket(service,model_ops, ip_str, &port); if (!sock) { - DEBUG(0,("service_setup_socket(port=%u) failed\n",e->ep_description.info.tcp_port)); + DEBUG(0,("service_setup_socket(port=%u) failed\n",port)); continue; } + /* And put the settings back into the binding. This will + * go away once we store the 'encoded' endpoint instead of a + * string describing it */ + if (e->ep_description.options == NULL) { + e->ep_description.options = talloc_array_p(dce_ctx, const char *, 2); + e->ep_description.options[0] = talloc_asprintf(dce_ctx, "%d", port); + e->ep_description.options[1] = NULL; + } + dcesrv_sock = talloc_p(sock, struct dcesrv_socket_context); if (!dcesrv_sock) { DEBUG(0,("talloc_p(sock->mem_ctx, struct dcesrv_socket_context) failed\n")); |