From 38242b55d93691a2b92225fa07fea27c85ee4e12 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 20 Mar 2024 14:27:27 +0100 Subject: [PATCH] smbd: move trace_state variable behind tv variable Next commit adds timestamp variables to trace_state that want to be initialized with the current time, so moving behind tv we can then just reuse tv for that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15624 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Guenther Deschner (cherry picked from commit 679e12aee2f0c283a6f9b9c6008c549a6ca9633e) --- source3/smbd/smb2_process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/smbd/smb2_process.c b/source3/smbd/smb2_process.c index fbbe4ef3992..188eaa14839 100644 --- a/source3/smbd/smb2_process.c +++ b/source3/smbd/smb2_process.c @@ -1783,10 +1783,6 @@ void smbd_process(struct tevent_context *ev_ctx, int sock_fd, bool interactive) { - struct smbd_tevent_trace_state trace_state = { - .ev = ev_ctx, - .frame = talloc_stackframe(), - }; const struct loadparm_substitution *lp_sub = loadparm_s3_global_substitution(); struct smbXsrv_client *client = NULL; @@ -1797,6 +1793,10 @@ void smbd_process(struct tevent_context *ev_ctx, int ret; NTSTATUS status; struct timeval tv = timeval_current(); + struct smbd_tevent_trace_state trace_state = { + .ev = ev_ctx, + .frame = talloc_stackframe(), + }; NTTIME now = timeval_to_nttime(&tv); char *chroot_dir = NULL; int rc; -- 2.47.2