diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-02 22:33:20 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-02 23:17:01 +0100 |
commit | 7808a2594c22ff452d54d2e9e272aa60e4b7e482 (patch) | |
tree | 991856d7d97832468344b81f3d82c8e49c732401 /source3/smbd/process.c | |
parent | 792324bf5a2bb29144c5ef6525d7d84f4934c93d (diff) | |
download | samba-7808a2594c22ff452d54d2e9e272aa60e4b7e482.tar.gz samba-7808a2594c22ff452d54d2e9e272aa60e4b7e482.tar.bz2 samba-7808a2594c22ff452d54d2e9e272aa60e4b7e482.zip |
Remove some inbuf references by adding "cmd" to smb_request
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index e32eea96a6..215ae20077 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -369,6 +369,7 @@ void init_smb_request(struct smb_request *req, (unsigned int)req_size )); exit_server_cleanly("Invalid SMB request"); } + req->cmd = CVAL(inbuf, smb_com); req->flags2 = SVAL(inbuf, smb_flg2); req->smbpid = SVAL(inbuf, smb_pid); req->mid = SVAL(inbuf, smb_mid); @@ -1451,8 +1452,7 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req, in /* encrypted required from now on. */ conn->encrypt_level = Required; } else if (ENCRYPTION_REQUIRED(conn)) { - uint8 com = CVAL(req->inbuf,smb_com); - if (com != SMBtrans2 && com != SMBtranss2) { + if (req->cmd != SMBtrans2 && req->cmd != SMBtranss2) { exit_server_cleanly("encryption required " "on connection"); return conn; @@ -1487,7 +1487,6 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req, in static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool encrypted) { - uint8 type = CVAL(inbuf,smb_com); connection_struct *conn; struct smb_request *req; @@ -1498,7 +1497,7 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool enc } init_smb_request(req, (uint8 *)inbuf, unread_bytes, encrypted); - conn = switch_message(type, req, size); + conn = switch_message(req->cmd, req, size); if (req->unread_bytes) { /* writeX failed. drain socket. */ |