diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-11-27 19:32:46 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-12-04 21:11:13 +0100 |
commit | 3f2abc458391536a8fc19a8cad399a34fdbc8876 (patch) | |
tree | 79c789f142e08be91bbd7fd697d7009afe9903bc /source3/locking | |
parent | 83943f929dbfcb9b2d4272a8e9fbd3331e04c685 (diff) | |
download | samba-3f2abc458391536a8fc19a8cad399a34fdbc8876.tar.gz |
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>
(cherry picked from commit 62e7e142aa350be8f25193bf9c39a19e354346ea)
Diffstat (limited to 'source3/locking')
-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 2a130cb4799..327ac796980 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 @@ -631,6 +632,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: " @@ -665,6 +676,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; |