]> 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)
committerGünther Deschner <gd@samba.org>
Thu, 19 Sep 2024 18:27:33 +0000 (18:27 +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>
source3/smbd/smb2_process.c

index eb94fa12f19c39e91e2b605ae5e3504d211c9639..ea2d4221d563e3ae432e4dbae188e545afcde2e2 100644 (file)
@@ -1830,10 +1830,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;
@@ -1844,6 +1840,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;