smbd: increase loglevel when leases_db_del() with anything then NT_STATUS_NOT_FOUND
authorRalph Boehme <slow@samba.org>
Thu, 2 Jul 2020 12:09:15 +0000 (14:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 2 Jul 2020 15:25:31 +0000 (15:25 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14428

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/locking/locking.c

index a108ebba00d652e933e727d391f0c51931ec8df5..c3fe5a246e237d521c50d7d126d6271ff789efec 100644 (file)
@@ -733,8 +733,13 @@ NTSTATUS remove_lease_if_stale(struct share_mode_lock *lck,
 
        status = leases_db_del(client_guid, lease_key, &d->id);
        if (!NT_STATUS_IS_OK(status)) {
-               DBG_DEBUG("leases_db_del failed: %s\n",
-                         nt_errstr(status));
+               int level = DBGLVL_DEBUG;
+
+               if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+                       level = DBGLVL_ERR;
+               }
+               DBG_PREFIX(level, ("leases_db_del failed: %s\n",
+                          nt_errstr(status)));
        }
        return status;
 }