git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fd96fd
)
- don't allow locking to initialise twice
author
Andrew Tridgell
<tridge@samba.org>
Wed, 29 Oct 1997 02:18:08 +0000
(
02:18
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 29 Oct 1997 02:18:08 +0000
(
02:18
+0000)
- check that it is initialised before de-initialising it!
(This used to be commit
68ad7b91999216e5721207b5a79c3a66be7cf420
)
source3/locking/locking.c
patch
|
blob
|
history
diff --git
a/source3/locking/locking.c
b/source3/locking/locking.c
index ae977b0f69822a532985e631c0c9c2e81c8f7f06..d654d038c812f819a14f4ba6c80509d890dfaaa7 100644
(file)
--- 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;
}