summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-26 03:05:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:16 -0500
commit764eddb69647681f784f343a122251ca1ecf62df (patch)
tree1d64246d07b4f040c4e36367e4172135c8af5011 /source4/rpc_server
parent4b1050a6cf3e6d9f7a8e75dd90ed1ccd52f29abb (diff)
downloadsamba-764eddb69647681f784f343a122251ca1ecf62df.tar.gz
samba-764eddb69647681f784f343a122251ca1ecf62df.tar.bz2
samba-764eddb69647681f784f343a122251ca1ecf62df.zip
r2646: - use a talloc destructor to ensure that sockets from the new socket
library are closed on abnormal termination - convert the service.h structures to the new talloc methods (This used to be commit 2dc334a3284858eb1c7190f9687c9b6c879ecc9d)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcerpc_server.c4
-rw-r--r--source4/rpc_server/dcerpc_tcp.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 22e677acd8..17e629d81e 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -988,7 +988,6 @@ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx, struct dcesrv_context **dce_ct
if (! *dce_ctx) {
return NT_STATUS_NO_MEMORY;
}
- talloc_set_name(*dce_ctx, "struct dcesrv_context");
(*dce_ctx)->endpoint_list = NULL;
@@ -1030,12 +1029,11 @@ static void dcesrv_init(struct server_service *service, const struct model_ops *
return;
}
- dce_ctx = talloc_p(NULL, struct dcesrv_context);
+ dce_ctx = talloc_p(service, struct dcesrv_context);
if (!dce_ctx) {
DEBUG(0,("talloc_p(mem_ctx, struct dcesrv_context) failed\n"));
return;
}
- talloc_set_name(dce_ctx, "dcesrv_init");
ZERO_STRUCTP(dce_ctx);
dce_ctx->endpoint_list = NULL;
diff --git a/source4/rpc_server/dcerpc_tcp.c b/source4/rpc_server/dcerpc_tcp.c
index a77d02e796..9a22c5eb5e 100644
--- a/source4/rpc_server/dcerpc_tcp.c
+++ b/source4/rpc_server/dcerpc_tcp.c
@@ -59,7 +59,7 @@ static void add_socket_rpc(struct server_service *service,
struct in_addr *ifip)
{
struct dcesrv_endpoint *e;
- char *ip_str = talloc_strdup(service->mem_ctx, inet_ntoa(*ifip));
+ char *ip_str = talloc_strdup(service, inet_ntoa(*ifip));
for (e=dce_ctx->endpoint_list;e;e=e->next) {
if (e->ep_description.type == ENDPOINT_TCP) {