summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-06-12 15:44:19 +0200
committerVolker Lendecke <vl@samba.org>2011-06-12 17:07:47 +0200
commitf0994c749505f11ea115f9e1ae7de52cf25412d0 (patch)
tree2ecd71121f12e6f3fabcbede6a47103d25413558
parentebf04d79abdf0a15248a266162c8ec8906ce3c5f (diff)
downloadsamba-f0994c749505f11ea115f9e1ae7de52cf25412d0.tar.gz
samba-f0994c749505f11ea115f9e1ae7de52cf25412d0.tar.bz2
samba-f0994c749505f11ea115f9e1ae7de52cf25412d0.zip
s3: Fix IO_TIMEOUT handling for wins queries
-rw-r--r--source3/libsmb/namequery.c15
1 files 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;