]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/smbd: Conditionally define smb2_request_to_snum()
authorAnoop C S <anoopcs@samba.org>
Tue, 24 Jun 2025 09:48:34 +0000 (15:18 +0530)
committerAnoop C S <anoopcs@samba.org>
Tue, 24 Jun 2025 14:24:57 +0000 (14:24 +0000)
As of now smb2_request_to_snum() is only meaningful when profiling is
enabled.

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Jun 24 14:24:57 UTC 2025 on atb-devel-224

source3/smbd/smb2_server.c

index 138ada1db5965258d0f06f87c9f6415a3966f9f3..dd5196e7fd0188ea596a5f4cc956152f458ce667 100644 (file)
@@ -3056,12 +3056,14 @@ static NTSTATUS smbd_smb2_request_dispatch_update_counts(
        return status;
 }
 
+#ifdef WITH_PROFILE
 static int smb2_request_to_snum(const struct smbd_smb2_request *req)
 {
        return (req->tcon != NULL) && (req->tcon->compat != NULL)
                       ? SNUM(req->tcon->compat)
                       : GLOBAL_SECTION_SNUM;
 }
+#endif
 
 NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
 {