mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +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:
parent
c67694ee0f
commit
3d9a720f09
@ -1327,14 +1327,12 @@ static void send_break_to_none(struct messaging_context *msg_ctx,
|
|||||||
const struct file_id *id,
|
const struct file_id *id,
|
||||||
const struct share_mode_entry *e)
|
const struct share_mode_entry *e)
|
||||||
{
|
{
|
||||||
char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE];
|
NTSTATUS status;
|
||||||
|
status = send_break_message(msg_ctx, id, e, OPLOCK_NONE);
|
||||||
share_mode_entry_to_message(msg, id, e);
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
/* Overload entry->op_type */
|
DBG_DEBUG("send_break_message failed: %s\n",
|
||||||
SSVAL(msg, OP_BREAK_MSG_OP_TYPE_OFFSET, NO_OPLOCK);
|
nt_errstr(status));
|
||||||
|
}
|
||||||
messaging_send_buf(msg_ctx, e->pid, MSG_SMB_BREAK_REQUEST,
|
|
||||||
(uint8_t *)msg, sizeof(msg));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool do_break_lease_to_none(struct share_mode_lock *lck,
|
static bool do_break_lease_to_none(struct share_mode_lock *lck,
|
||||||
|
Loading…
Reference in New Issue
Block a user