diff options
author | Rafal Szczesniak <mimir@samba.org> | 2007-05-04 18:59:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:00 -0500 |
commit | d02dc1b6740d113f68d12ba415672611fe854967 (patch) | |
tree | c0cdf809dc6d9c89ba10d1a3d0d71d0e25007ba8 /source4 | |
parent | 5f475b80ee038085449647164069e8e70d37cf5d (diff) | |
download | samba-d02dc1b6740d113f68d12ba415672611fe854967.tar.gz samba-d02dc1b6740d113f68d12ba415672611fe854967.tar.bz2 samba-d02dc1b6740d113f68d12ba415672611fe854967.zip |
r22672: use composite_create calls instead of talloc_zero.
rafal
(This used to be commit 969b175c739ca29b04c15a26a05f317703eed656)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_rpc.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index b07d88a740..8bc47f7ad6 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -57,15 +57,13 @@ static struct composite_context* libnet_RpcConnectSrv_send(struct libnet_context struct composite_context *pipe_connect_req; /* composite context allocation and setup */ - c = talloc_zero(mem_ctx, struct composite_context); - if (c == NULL) return NULL; + c = composite_create(ctx, ctx->event_ctx); + if (c == NULL) return c; s = talloc_zero(c, struct rpc_connect_srv_state); if (composite_nomem(s, c)) return c; - c->state = COMPOSITE_STATE_IN_PROGRESS; c->private_data = s; - c->event_ctx = ctx->event_ctx; s->ctx = ctx; s->r = *r; @@ -218,15 +216,13 @@ static struct composite_context* libnet_RpcConnectDC_send(struct libnet_context struct composite_context *lookup_dc_req; /* composite context allocation and setup */ - c = talloc_zero(mem_ctx, struct composite_context); - if (c == NULL) return NULL; + c = composite_create(ctx, ctx->event_ctx); + if (c == NULL) return c; s = talloc_zero(c, struct rpc_connect_dc_state); if (composite_nomem(s, c)) return c; - c->state = COMPOSITE_STATE_IN_PROGRESS; c->private_data = s; - c->event_ctx = ctx->event_ctx; s->ctx = ctx; s->r = *r; @@ -433,15 +429,13 @@ static struct composite_context* libnet_RpcConnectDCInfo_send(struct libnet_cont struct rpc_connect_dci_state *s; /* composite context allocation and setup */ - c = talloc_zero(mem_ctx, struct composite_context); - if (c == NULL) return NULL; + c = composite_create(ctx, ctx->event_ctx); + if (c == NULL) return c; s = talloc_zero(c, struct rpc_connect_dci_state); if (composite_nomem(s, c)) return c; - c->state = COMPOSITE_STATE_IN_PROGRESS; c->private_data = s; - c->event_ctx = ctx->event_ctx; s->ctx = ctx; s->r = *r; |