Revert "s3: Make the implicit reference to get_Protocol in lp_use_sendfile() explicit"
authorVolker Lendecke <vl@samba.org>
Mon, 23 Nov 2009 15:33:45 +0000 (16:33 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 23 Nov 2009 15:34:59 +0000 (16:34 +0100)
This reverts commit 6a149022976fe6a5579ec9afc7a4d2dcb44dc8af.

source3/include/proto.h
source3/param/loadparm.c
source3/smbd/reply.c

index d4b734b..4622118 100644 (file)
@@ -4387,8 +4387,7 @@ const char *lp_printcapname(void);
 bool lp_disable_spoolss( void );
 void lp_set_spoolss_state( uint32 state );
 uint32 lp_get_spoolss_state( void );
-bool lp_use_sendfile(int snum, enum protocol_types proto,
-                    struct smb_signing_state *signing_state);
+bool lp_use_sendfile(int snum, struct smb_signing_state *signing_state);
 void set_use_sendfile(int snum, bool val);
 void set_store_dos_attributes(int snum, bool val);
 void lp_set_mangling_method(const char *new_method);
index b7eb80e..83c6ef5 100644 (file)
@@ -9714,13 +9714,12 @@ uint32 lp_get_spoolss_state( void )
  Ensure we don't use sendfile if server smb signing is active.
 ********************************************************************/
 
-bool lp_use_sendfile(int snum, enum protocol_types proto,
-                    struct smb_signing_state *signing_state)
+bool lp_use_sendfile(int snum, struct smb_signing_state *signing_state)
 {
        bool sign_active = false;
 
        /* Using sendfile blows the brains out of any DOS or Win9x TCP stack... JRA. */
-       if (proto < PROTOCOL_NT1) {
+       if (get_Protocol() < PROTOCOL_NT1) {
                return false;
        }
        if (signing_state) {
index 0b77d82..4d7166f 100644 (file)
@@ -2925,8 +2925,7 @@ static void send_file_readbraw(connection_struct *conn,
 
        if ( !req_is_in_chain(req) && (nread > 0) && (fsp->base_fsp == NULL) &&
            (fsp->wcp == NULL) &&
-            lp_use_sendfile(SNUM(conn), get_Protocol(),
-                            smbd_server_conn->smb1.signing_state) ) {
+           lp_use_sendfile(SNUM(conn), smbd_server_conn->smb1.signing_state) ) {
                ssize_t sendfile_read = -1;
                char header[4];
                DATA_BLOB header_blob;
@@ -3453,8 +3452,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
        if (!req_is_in_chain(req) &&
            !is_encrypted_packet(req->inbuf) && (fsp->base_fsp == NULL) &&
            (fsp->wcp == NULL) &&
-           lp_use_sendfile(SNUM(conn), get_Protocol(),
-                           smbd_server_conn->smb1.signing_state) ) {
+           lp_use_sendfile(SNUM(conn), smbd_server_conn->smb1.signing_state) ) {
                uint8 headerbuf[smb_size + 12 * 2];
                DATA_BLOB header;