summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-09-05 17:56:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:16 -0500
commit1da09b94eb4c602f9b0dde748181e971927160d2 (patch)
treea7cf78bc971e4c05095276f06c300b707e384856 /source4
parent3c6ce57101eb555d01152b1fe5ea15fcf5bb8133 (diff)
downloadsamba-1da09b94eb4c602f9b0dde748181e971927160d2.tar.gz
samba-1da09b94eb4c602f9b0dde748181e971927160d2.tar.bz2
samba-1da09b94eb4c602f9b0dde748181e971927160d2.zip
r18101: Use composite_create function and add monitor function pointer
to the state structure. rafal (This used to be commit 76d73bc97dfcbba0667b8d831bfbf3113a8edfcb)
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_domain.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c
index 80ae547625..806d9d0fd1 100644
--- a/source4/libnet/libnet_domain.c
+++ b/source4/libnet/libnet_domain.c
@@ -48,6 +48,9 @@ struct domain_open_samr_state {
uint32_t access_mask;
struct policy_handle connect_handle;
struct policy_handle domain_handle;
+
+ /* information about the progress */
+ void (*monitor_fn)(struct monitor_msg*);
};
@@ -252,15 +255,14 @@ struct composite_context *libnet_DomainOpenSamr_send(struct libnet_context *ctx,
struct composite_context *c;
struct domain_open_samr_state *s;
- c = talloc_zero(ctx, struct composite_context);
+ c = composite_create(ctx, ctx->event_ctx);
if (c == NULL) return NULL;
s = talloc_zero(c, struct domain_open_samr_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->monitor_fn = monitor;
s->ctx = ctx;
s->pipe = ctx->samr.pipe;
@@ -375,6 +377,9 @@ struct domain_open_lsa_state {
struct lsa_OpenPolicy2 openpol;
struct policy_handle handle;
struct dcerpc_pipe *pipe;
+
+ /* information about the progress */
+ void (*monitor_fn)(struct monitor_msg*);
};