diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-29 02:18:08 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-29 02:18:08 +0000 |
commit | 68ad7b91999216e5721207b5a79c3a66be7cf420 (patch) | |
tree | bc13a1f03b138a84ee1a8a6b89cff77210f4c0bd | |
parent | 6b6f624b63137d4750200e8cb4961b1402513632 (diff) | |
download | samba-68ad7b91999216e5721207b5a79c3a66be7cf420.tar.gz samba-68ad7b91999216e5721207b5a79c3a66be7cf420.tar.xz samba-68ad7b91999216e5721207b5a79c3a66be7cf420.zip |
- don't allow locking to initialise twice
- check that it is initialised before de-initialising it!
-rw-r--r-- | source/locking/locking.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c index ae977b0f698..d654d038c81 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -113,6 +113,8 @@ BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 * ****************************************************************************/ BOOL locking_init(int read_only) { + if (share_ops) return True; + #ifdef FAST_SHARE_MODES share_ops = locking_shm_init(read_only); if (!share_ops) { @@ -135,7 +137,9 @@ BOOL locking_init(int read_only) ******************************************************************/ BOOL locking_end(void) { - return share_ops->stop_mgmt(); + if (share_ops) + return share_ops->stop_mgmt(); + return True; } |