From 8104968004a3a7fcfe4febb9918ecbf37ba948ac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Sep 2008 21:59:04 -0700 Subject: return a more useful error message when no name resolution methods are available --- source4/libcli/resolve/resolve.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4') diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c index d89b50e430..2b14591d68 100644 --- a/source4/libcli/resolve/resolve.c +++ b/source4/libcli/resolve/resolve.c @@ -165,6 +165,10 @@ struct composite_context *resolve_name_send(struct resolve_context *ctx, } state->method = ctx->methods; + if (state->method == NULL) { + composite_error(c, NT_STATUS_HOST_UNREACHABLE); + return c; + } state->creq = setup_next_method(c); if (composite_nomem(state->creq, c)) return c; -- cgit