s4-torture: handle NT_STATUS_CONNECTION_RESET
authorAndrew Tridgell <tridge@samba.org>
Thu, 4 Feb 2010 09:19:05 +0000 (20:19 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 4 Feb 2010 10:22:43 +0000 (21:22 +1100)
a CONNECTION_RESET is now the normal "client disconnect" status code

source4/torture/raw/lockbench.c
source4/torture/raw/offline.c
source4/torture/raw/openbench.c

index a3fe03370fd3c6c8a86dfe0d3a05ddb7f69e2649..98ca5f37a474ddee0bb923018e532c490454a0c6 100644 (file)
@@ -226,7 +226,8 @@ static void lock_completion(struct smbcli_request *req)
        state->req = NULL;
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-                   NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
+                   NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT) ||
+                   NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
                        talloc_free(state->tree);
                        state->tree = NULL;
                        num_connected--;        
@@ -264,7 +265,8 @@ static void echo_completion(struct smbcli_request *req)
        struct benchlock_state *state = (struct benchlock_state *)req->async.private_data;
        NTSTATUS status = smbcli_request_simple_recv(req);
        if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
+           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
                talloc_free(state->tree);
                state->tree = NULL;
                num_connected--;        
index de72c88b5c14dfe4a454d9141136a378ea6ab3cc..3b8bbdd53a0ae3840c36906acae6ea75c639934f 100644 (file)
@@ -317,7 +317,8 @@ static void echo_completion(struct smbcli_request *req)
        struct offline_state *state = (struct offline_state *)req->async.private_data;
        NTSTATUS status = smbcli_request_simple_recv(req);
        if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
+           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
                talloc_free(state->tree);
                state->tree = NULL;
                num_connected--;        
index 2716f6a528507d0585d6ac913bd563e038e4663a..837b7c345a620f103e36ffe43ce274244edfd044 100644 (file)
@@ -222,7 +222,8 @@ static void open_completed(struct smbcli_request *req)
        state->req_open = NULL;
 
        if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
+           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
                talloc_free(state->tree);
                talloc_free(state->cli);
                state->tree = NULL;
@@ -281,7 +282,8 @@ static void close_completed(struct smbcli_request *req)
        state->req_close = NULL;
 
        if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
+           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
                talloc_free(state->tree);
                talloc_free(state->cli);
                state->tree = NULL;
@@ -315,7 +317,8 @@ static void echo_completion(struct smbcli_request *req)
        struct benchopen_state *state = (struct benchopen_state *)req->async.private_data;
        NTSTATUS status = smbcli_request_simple_recv(req);
        if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE) ||
-           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT)) {
+           NT_STATUS_EQUAL(status, NT_STATUS_LOCAL_DISCONNECT) ||
+           NT_STATUS_EQUAL(status, NT_STATUS_CONNECTION_RESET)) {
                talloc_free(state->tree);
                state->tree = NULL;
                num_connected--;