summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-29 02:18:08 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-29 02:18:08 +0000
commitcb6941a19390113cbe61f436e74c9d969afd00d0 (patch)
treea1f620620d588d2e8f9d5080e2ada329ebfa4f27 /source3/locking
parent4fd96fddd2b13f60c4eb13263bac2a62a2795dcc (diff)
downloadsamba-cb6941a19390113cbe61f436e74c9d969afd00d0.tar.gz
samba-cb6941a19390113cbe61f436e74c9d969afd00d0.tar.bz2
samba-cb6941a19390113cbe61f436e74c9d969afd00d0.zip
- don't allow locking to initialise twice
- check that it is initialised before de-initialising it! (This used to be commit 68ad7b91999216e5721207b5a79c3a66be7cf420)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index ae977b0f69..d654d038c8 100644
--- a/source3/locking/locking.c
+++ b/source3/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;
}