git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a60c26
)
Fix broken smb_thread_once function (again)
author
Derrell Lipman
<derrell@dworkin.(none)>
Wed, 13 May 2009 01:32:33 +0000
(21:32 -0400)
committer
Derrell Lipman
<derrell@dworkin.(none)>
Wed, 13 May 2009 01:32:33 +0000
(21:32 -0400)
- It would help if smb_thread_once did, eventually, set the variable that
prevents the init function from being run again. Sigh. It must be getting
late.
Derrell
lib/util/smb_threads.c
patch
|
blob
|
history
diff --git
a/lib/util/smb_threads.c
b/lib/util/smb_threads.c
index 6f84a2e7476d78dc82bff6bb5df58fbb6c90ab0c..e2d01f775a4e0e7d09183fa704a2ff6d9001207e 100644
(file)
--- a/
lib/util/smb_threads.c
+++ b/
lib/util/smb_threads.c
@@
-121,6
+121,9
@@
int smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void))
if (! *ponce) {
/* Nope, we need to run the initialization function */
(*init_fn)();
+
+ /* Now we can indicate that the function has been run */
+ *ponce = true;
}
/* Unlock the mutex */