summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_schannel.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-30 18:36:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:14 -0500
commit5c1d8810911af7335bf299fbb871f7230ea7a717 (patch)
tree58d3b9723b829ad47a31c78abb70b307d6c22ba5 /source4/librpc/rpc/dcerpc_schannel.c
parent2ac4cdf85e0359840a232d1e6182dd1607acc22c (diff)
downloadsamba-5c1d8810911af7335bf299fbb871f7230ea7a717.tar.gz
samba-5c1d8810911af7335bf299fbb871f7230ea7a717.tar.bz2
samba-5c1d8810911af7335bf299fbb871f7230ea7a717.zip
r17326: make better usage of the composite api
metze (This used to be commit 097c9f09f3b9b45f7b0386dfb02173c1515ed45c)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_schannel.c')
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index e9b62ddc3a..9286707618 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -232,15 +232,12 @@ struct composite_context *dcerpc_schannel_key_send(TALLOC_CTX *mem_ctx,
struct composite_context *epm_map_req;
/* composite context allocation and setup */
- c = talloc_zero(mem_ctx, struct composite_context);
+ c = composite_create(mem_ctx, p->conn->event_ctx);
if (c == NULL) return NULL;
s = talloc_zero(c, struct schannel_key_state);
if (composite_nomem(s, c)) return c;
-
- c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = s;
- c->event_ctx = p->conn->event_ctx;
/* store parameters in the state structure */
s->pipe = p;
@@ -357,16 +354,13 @@ struct composite_context *dcerpc_bind_auth_schannel_send(TALLOC_CTX *tmp_ctx,
struct composite_context *schan_key_req;
/* composite context allocation and setup */
- c = talloc_zero(tmp_ctx, struct composite_context);
+ c = composite_create(tmp_ctx, p->conn->event_ctx);
if (c == NULL) return NULL;
s = talloc_zero(c, struct auth_schannel_state);
if (composite_nomem(s, c)) return c;
-
- c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = s;
- c->event_ctx = p->conn->event_ctx;
-
+
/* store parameters in the state structure */
s->pipe = p;
s->credentials = credentials;