1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

smbd: Simplify callers of notify_filter_string

This is exactly the application talloc_tos() was made for

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jun 24 17:27:04 UTC 2024 on atb-devel-224
This commit is contained in:
Volker Lendecke 2024-06-20 20:25:24 +02:00 committed by Jeremy Allison
parent a37ea9d750
commit d86f9ff7fd
2 changed files with 8 additions and 28 deletions

View File

@ -1675,20 +1675,10 @@ static void call_nt_transact_notify_change(connection_struct *conn,
return;
}
{
char *filter_string;
if (!(filter_string = notify_filter_string(NULL, filter))) {
reply_nterror(req,NT_STATUS_NO_MEMORY);
return;
}
DEBUG(3,("call_nt_transact_notify_change: notify change "
"called on %s, filter = %s, recursive = %d\n",
fsp_str_dbg(fsp), filter_string, recursive));
TALLOC_FREE(filter_string);
}
DBG_NOTICE("notify change called on %s, filter = %s, recursive = %d\n",
fsp_str_dbg(fsp),
notify_filter_string(talloc_tos(), filter),
recursive);
if((!fsp->fsp_flags.is_directory) || (conn != fsp->conn)) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);

View File

@ -240,20 +240,10 @@ static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx,
state->smbreq = smbreq;
smbreq->async_priv = (void *)req;
if (DEBUGLEVEL >= 3) {
char *filter_string;
filter_string = notify_filter_string(NULL, in_completion_filter);
if (tevent_req_nomem(filter_string, req)) {
return tevent_req_post(req, ev);
}
DEBUG(3,("smbd_smb2_notify_send: notify change "
"called on %s, filter = %s, recursive = %d\n",
fsp_str_dbg(fsp), filter_string, recursive));
TALLOC_FREE(filter_string);
}
DBG_NOTICE("notify change called on %s, filter = %s, recursive = %d\n",
fsp_str_dbg(fsp),
notify_filter_string(talloc_tos(), in_completion_filter),
recursive);
if ((!fsp->fsp_flags.is_directory) || (conn != fsp->conn)) {
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);