From 9b95f57530c1f2c8b1d952f6035fcae8dde74b85 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 29 May 2007 07:32:28 +0000 Subject: r23180: auto-reconnect on both NT_STATUS_END_OF_FILE and NT_STATUS_LOCAL_DISCONNECT (This used to be commit 32a6c268a7963382dc05f53783ac22f7fd0de429) --- source4/torture/raw/lockbench.c | 6 ++++-- source4/torture/raw/openbench.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'source4/torture/raw') diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c index 361f509c40..e929218ead 100644 --- a/source4/torture/raw/lockbench.c +++ b/source4/torture/raw/lockbench.c @@ -212,7 +212,8 @@ static void lock_completion(struct smbcli_request *req) NTSTATUS status = smbcli_request_simple_recv(req); state->req = NULL; if (!NT_STATUS_IS_OK(status)) { - if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) || + NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) { talloc_free(state->tree); state->tree = NULL; num_connected--; @@ -249,7 +250,8 @@ static void echo_completion(struct smbcli_request *req) struct benchlock_state *state = talloc_get_type(req->async.private, struct benchlock_state); NTSTATUS status = smbcli_request_simple_recv(req); - if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) || + NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) { talloc_free(state->tree); state->tree = NULL; num_connected--; diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c index 86b97fb9c8..fe01f1f5e2 100644 --- a/source4/torture/raw/openbench.c +++ b/source4/torture/raw/openbench.c @@ -283,7 +283,8 @@ static void echo_completion(struct smbcli_request *req) struct benchopen_state *state = talloc_get_type(req->async.private, struct benchopen_state); NTSTATUS status = smbcli_request_simple_recv(req); - if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) || + NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) { talloc_free(state->tree); state->tree = NULL; num_connected--; -- cgit