svn commit: samba r22672 - in branches/SAMBA_4_0/source/libnet: .

mimir at samba.org mimir at samba.org
Fri May 4 18:59:51 GMT 2007


Author: mimir
Date: 2007-05-04 18:59:51 +0000 (Fri, 04 May 2007)
New Revision: 22672

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22672

Log:
use composite_create calls instead of talloc_zero.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/libnet_rpc.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_rpc.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_rpc.c	2007-05-04 18:18:53 UTC (rev 22671)
+++ branches/SAMBA_4_0/source/libnet/libnet_rpc.c	2007-05-04 18:59:51 UTC (rev 22672)
@@ -57,15 +57,13 @@
 	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 @@
 	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 @@
 	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;



More information about the samba-cvs mailing list