]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: move trace_state variable behind tv variable
authorRalph Boehme <slow@samba.org>
Wed, 20 Mar 2024 13:27:27 +0000 (14:27 +0100)
committerJule Anger <janger@samba.org>
Wed, 2 Oct 2024 14:34:13 +0000 (14:34 +0000)
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 <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 679e12aee2f0c283a6f9b9c6008c549a6ca9633e)

source3/smbd/smb2_process.c

index fbbe4ef399245037a2c54aa0649e3299fd26c3da..188eaa1483949a3315c31340c2ca7bc28b9765c4 100644 (file)
@@ -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;