From f0994c749505f11ea115f9e1ae7de52cf25412d0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 12 Jun 2011 15:44:19 +0200 Subject: s3: Fix IO_TIMEOUT handling for wins queries --- source3/libsmb/namequery.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 5969f656c1..a4b2258b33 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -1423,9 +1423,18 @@ NTSTATUS name_query_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, req, struct name_query_state); NTSTATUS status; - if (tevent_req_is_nterror(req, &status) - && !NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { - return status; + if (tevent_req_is_nterror(req, &status)) { + if (state->bcast && + NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { + /* + * In the broadcast case we collect replies until the + * timeout. + */ + status = NT_STATUS_OK; + } + if (!NT_STATUS_IS_OK(status)) { + return status; + } } if (state->num_addrs == 0) { return NT_STATUS_NOT_FOUND; -- cgit