Author: vlendec Date: 2005-07-16 09:09:19 +0000 (Sat, 16 Jul 2005) New Revision: 8512
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8512 Log: Jeremy, I did not see a distinction between LEVEL_II_OPLOCK_BREAK_CMD and OPLOCK_BREAK_CMD anywhere in the code. This removes LEVEL_II_OPLOCK_BREAK_CMD. I'm sure you will take a close look at this... :-) Thanks, Volker Modified: trunk/source/include/smb.h trunk/source/smbd/oplock.c Changeset: Modified: trunk/source/include/smb.h =================================================================== --- trunk/source/include/smb.h 2005-07-16 01:02:17 UTC (rev 8511) +++ trunk/source/include/smb.h 2005-07-16 09:09:19 UTC (rev 8512) @@ -1511,7 +1511,6 @@ /* Message types */ #define OPLOCK_BREAK_CMD 0x1 #define KERNEL_OPLOCK_BREAK_CMD 0x2 -#define LEVEL_II_OPLOCK_BREAK_CMD 0x3 #define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4 /* Add the "deferred open" message. */ Modified: trunk/source/smbd/oplock.c =================================================================== --- trunk/source/smbd/oplock.c 2005-07-16 01:02:17 UTC (rev 8511) +++ trunk/source/smbd/oplock.c 2005-07-16 09:09:19 UTC (rev 8512) @@ -381,7 +381,6 @@ break; case OPLOCK_BREAK_CMD: - case LEVEL_II_OPLOCK_BREAK_CMD: case ASYNC_LEVEL_II_OPLOCK_BREAK_CMD: /* Ensure that the msg length is correct. */ @@ -483,8 +482,7 @@ * case. */ - if (!((break_cmd_type == OPLOCK_BREAK_CMD) || - (break_cmd_type == LEVEL_II_OPLOCK_BREAK_CMD))) { + if (break_cmd_type != OPLOCK_BREAK_CMD) { return True; } @@ -997,7 +995,6 @@ SMB_DEV_T dev = share_entry->dev; SMB_INO_T inode = share_entry->inode; unsigned long file_id = share_entry->share_file_id; - uint16 break_cmd_type; if(pid == share_entry->pid) { /* We are breaking our own oplock, make sure it's us. */ @@ -1027,13 +1024,7 @@ /* We need to send a OPLOCK_BREAK_CMD message to the port in the share mode entry. */ - if (LEVEL_II_OPLOCK_TYPE(share_entry->op_type)) { - break_cmd_type = LEVEL_II_OPLOCK_BREAK_CMD; - } else { - break_cmd_type = OPLOCK_BREAK_CMD; - } - - SSVAL(op_break_msg,OPBRK_MESSAGE_CMD_OFFSET,break_cmd_type); + SSVAL(op_break_msg,OPBRK_MESSAGE_CMD_OFFSET,OPLOCK_BREAK_CMD); memcpy(op_break_msg+OPLOCK_BREAK_PID_OFFSET,(char *)&pid,sizeof(pid)); memcpy(op_break_msg+OPLOCK_BREAK_DEV_OFFSET,(char *)&dev,sizeof(dev)); memcpy(op_break_msg+OPLOCK_BREAK_INODE_OFFSET,(char *)&inode,sizeof(inode)); @@ -1119,7 +1110,7 @@ * Test to see if this is the reply we are awaiting (ie. the one we sent with the CMD_REPLY flag OR'ed in). */ if((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & CMD_REPLY) && - ((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & ~CMD_REPLY) == break_cmd_type) && + ((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & ~CMD_REPLY) == OPLOCK_BREAK_CMD) && (reply_from_port == share_entry->op_port) && (memcmp(&reply_msg_start[OPLOCK_BREAK_PID_OFFSET], &op_break_msg[OPLOCK_BREAK_PID_OFFSET], OPLOCK_BREAK_MSG_LEN - OPLOCK_BREAK_PID_OFFSET) == 0)) {