summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/resolve/resolve.c')
-rw-r--r--source4/libcli/resolve/resolve.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index c9e2fa503b..db5aefeaeb 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -103,6 +103,7 @@ static struct composite_context *setup_next_method(struct composite_context *c)
creq = method->send_fn(&state->name, c->event_ctx);
}
if (creq == NULL && state->methods[0]) state->methods++;
+
} while (!creq && state->methods[0]);
if (creq) {
@@ -138,9 +139,11 @@ struct composite_context *resolve_name_send(struct nbt_name *name, struct event_
c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = state;
+
if (event_ctx == NULL) {
c->event_ctx = event_context_init(c);
if (c->event_ctx == NULL) goto failed;
+
} else {
c->event_ctx = talloc_reference(c, event_ctx);
}