r22683: fix the logic for skipping the pipe_dead()
authorStefan Metzmacher <metze@samba.org>
Sat, 5 May 2007 19:05:42 +0000 (19:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:52:01 +0000 (14:52 -0500)
code on the 2nd run.

thanks volker for finding this!

metze

source/librpc/rpc/dcerpc_smb.c
source/librpc/rpc/dcerpc_smb2.c

index 3f35eae8f1e981d0713755bab26ea8e8afcc0bb1..1eead06a48a1ed6604e3e1a1da98429ab45384c2 100644 (file)
@@ -42,12 +42,12 @@ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status)
 {
        struct smb_private *smb = c->transport.private;
 
-       smb->dead = true;
-
        if (smb->dead) {
                return;
        }
 
+       smb->dead = true;
+
        if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) {
                status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
        }
index 15605c21da462ff942a87e0da4791db7635beb20..56f8e9b85c99930cf18cc28e15d52d041467e81c 100644 (file)
@@ -44,12 +44,12 @@ static void pipe_dead(struct dcerpc_connection *c, NTSTATUS status)
 {
        struct smb2_private *smb = c->transport.private;
 
-       smb->dead = true;
-
        if (smb->dead) {
                return;
        }
 
+       smb->dead = true;
+
        if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) {
                status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
        }