s3: Lift smbd_server_fd() from receive_smb_raw_talloc
authorVolker Lendecke <vl@samba.org>
Sun, 15 Aug 2010 13:38:31 +0000 (15:38 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Aug 2010 20:44:03 +0000 (22:44 +0200)
source3/smbd/process.c

index 099585e7f9aa1a6e0123d7fa340905b1cd204d82..07b53a254d487a9b4f6dd1709cc66f45cd35b78f 100644 (file)
@@ -367,11 +367,6 @@ static NTSTATUS receive_smb_raw_talloc(TALLOC_CTX *mem_ctx, int fd,
 
        status = read_smb_length_return_keepalive(fd, lenbuf, timeout, &len);
        if (!NT_STATUS_IS_OK(status)) {
-               char addr[INET6_ADDRSTRLEN];
-               DEBUG(0, ("read_smb_length_return_keepalive failed for "
-                         "client %s read error = %s.\n",
-                         get_peer_addr(fd, addr, sizeof(addr)),
-                         nt_errstr(status)));
                return status;
        }
 
@@ -427,6 +422,11 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx,    int fd,
        status = receive_smb_raw_talloc(mem_ctx, fd, buffer, timeout,
                                        p_unread, &len);
        if (!NT_STATUS_IS_OK(status)) {
+               char addr[INET6_ADDRSTRLEN];
+               DEBUG(0, ("read_smb_length_return_keepalive failed for "
+                         "client %s read error = %s.\n",
+                         get_peer_addr(fd, addr, sizeof(addr)),
+                         nt_errstr(status)));
                return status;
        }