Now that we transmit the level we want to break to via the msg.op_type
we can unify MSG_SMB_BREAK_REQUEST and MSG_SMB_ASYNC_LEVEL2_BREAK and
thus simplify the code a bit.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
OPLOCKLEVEL_II : OPLOCKLEVEL_NONE);
}
OPLOCKLEVEL_II : OPLOCKLEVEL_NONE);
}
+ if ((fsp->oplock_type == LEVEL_II_OPLOCK) && (break_to == NO_OPLOCK)) {
+ /*
+ * This is an async break without a reply and thus no timeout
+ */
+ remove_oplock(fsp);
+ return;
+ }
fsp->sent_oplock_break = break_to_level2 ? LEVEL_II_BREAK_SENT:BREAK_TO_NONE_SENT;
fsp->sent_oplock_break = break_to_level2 ? LEVEL_II_BREAK_SENT:BREAK_TO_NONE_SENT;
add_oplock_timeout_handler(fsp);
}
add_oplock_timeout_handler(fsp);
}
}
share_mode_entry_to_message(msg, share_entry);
}
share_mode_entry_to_message(msg, share_entry);
+ /* Overload entry->op_type */
+ SSVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET, NO_OPLOCK);
messaging_send_buf(state->sconn->msg_ctx, share_entry->pid,
messaging_send_buf(state->sconn->msg_ctx, share_entry->pid,
- MSG_SMB_ASYNC_LEVEL2_BREAK,
(uint8 *)msg, sizeof(msg));
}
(uint8 *)msg, sizeof(msg));
}