From be050125b60028ab05dfd685291d2163c2e5903a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Sep 2008 08:42:12 -0700 Subject: - make bcast name resolution match other name resolution modules for host not found errors - when we have no resolve context return NT_STATUS_OBJECT_NAME_NOT_FOUND --- source4/libcli/resolve/bcast.c | 8 +++++++- source4/libcli/resolve/resolve.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/resolve/bcast.c b/source4/libcli/resolve/bcast.c index 2e2eb05397..ca78a2ce43 100644 --- a/source4/libcli/resolve/bcast.c +++ b/source4/libcli/resolve/bcast.c @@ -75,7 +75,13 @@ struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx, NTSTATUS resolve_name_bcast_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, const char **reply_addr) { - return resolve_name_nbtlist_recv(c, mem_ctx, reply_addr); + NTSTATUS status = resolve_name_nbtlist_recv(c, mem_ctx, reply_addr); + if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { + /* this makes much more sense for a bcast name resolution + timeout */ + status = NT_STATUS_OBJECT_NAME_NOT_FOUND; + } + return status; } /* diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c index 2b14591d68..dbc4a2ede7 100644 --- a/source4/libcli/resolve/resolve.c +++ b/source4/libcli/resolve/resolve.c @@ -166,7 +166,7 @@ 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); + composite_error(c, NT_STATUS_BAD_NETWORK_NAME); return c; } state->creq = setup_next_method(c); -- cgit