summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-09-29 21:59:04 -0700
committerAndrew Tridgell <tridge@samba.org>2008-09-29 21:59:04 -0700
commit8104968004a3a7fcfe4febb9918ecbf37ba948ac (patch)
treef289cdd07eea65e9cb4d23f15c3ef870e235c0de
parentc951a881da60b51e06a5182c5ad9fb32482b0ab5 (diff)
downloadsamba-8104968004a3a7fcfe4febb9918ecbf37ba948ac.tar.gz
samba-8104968004a3a7fcfe4febb9918ecbf37ba948ac.tar.bz2
samba-8104968004a3a7fcfe4febb9918ecbf37ba948ac.zip
return a more useful error message when no name resolution methods are
available
-rw-r--r--source4/libcli/resolve/resolve.c4
1 files changed, 4 insertions, 0 deletions
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;