1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbd: Use send_break_message() in send_break_to_none()

Centralize the marshalling code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-05-16 15:34:37 +02:00 committed by Jeremy Allison
parent c67694ee0f
commit 3d9a720f09

View File

@ -1327,14 +1327,12 @@ static void send_break_to_none(struct messaging_context *msg_ctx,
const struct file_id *id,
const struct share_mode_entry *e)
{
char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE];
share_mode_entry_to_message(msg, id, e);
/* Overload entry->op_type */
SSVAL(msg, OP_BREAK_MSG_OP_TYPE_OFFSET, NO_OPLOCK);
messaging_send_buf(msg_ctx, e->pid, MSG_SMB_BREAK_REQUEST,
(uint8_t *)msg, sizeof(msg));
NTSTATUS status;
status = send_break_message(msg_ctx, id, e, OPLOCK_NONE);
if (!NT_STATUS_IS_OK(status)) {
DBG_DEBUG("send_break_message failed: %s\n",
nt_errstr(status));
}
}
static bool do_break_lease_to_none(struct share_mode_lock *lck,