diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-11-27 19:32:46 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-12-04 05:45:09 +0100 |
commit | 62e7e142aa350be8f25193bf9c39a19e354346ea (patch) | |
tree | 61ff7cfe138e8f4b68355135a441153beb281298 | |
parent | a504b84ec147f64c428095519099104a2cb6ff1f (diff) | |
download | samba-62e7e142aa350be8f25193bf9c39a19e354346ea.tar.gz samba-62e7e142aa350be8f25193bf9c39a19e354346ea.tar.xz samba-62e7e142aa350be8f25193bf9c39a19e354346ea.zip |
s3:locking: cleanup leases_db from share_mode_cleanup_disconnected()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/locking/share_mode_lock.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 2ae7c3373b..138950fc06 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -47,6 +47,7 @@ #include "util_tdb.h" #include "../librpc/gen_ndr/ndr_open_files.h" #include "source3/lib/dbwrap/dbwrap_watch.h" +#include "locking/leases_db.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_LOCKING @@ -638,6 +639,16 @@ bool share_mode_cleanup_disconnected(struct file_id fid, } } + for (n=0; n < data->num_leases; n++) { + struct share_mode_lease *l = &data->leases[n]; + NTSTATUS status; + + status = leases_db_del(&l->client_guid, &l->lease_key, &fid); + + DEBUG(10, ("%s: leases_db_del returned %s\n", __func__, + nt_errstr(status))); + } + ok = brl_cleanup_disconnected(fid, open_persistent_id); if (!ok) { DEBUG(10, ("share_mode_cleanup_disconnected: " @@ -672,6 +683,7 @@ bool share_mode_cleanup_disconnected(struct file_id fid, (unsigned long long)open_persistent_id)); data->num_share_modes = 0; + data->num_leases = 0; data->modified = true; ret = true; |