diff options
author | Volker Lendecke <vl@samba.org> | 2019-05-16 15:34:37 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-05-16 22:33:21 +0000 |
commit | 3d9a720f092b8c45184a0d53540fb490a3fdef9d (patch) | |
tree | 445b0dfa40854175d91b0ca60572a34345a60bac | |
parent | c67694ee0fff6f444813a9a9f39a156ddff5019e (diff) | |
download | samba-3d9a720f092b8c45184a0d53540fb490a3fdef9d.tar.gz |
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>
-rw-r--r-- | source3/smbd/oplock.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 22277abab07..d08003bb3e9 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -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, |