summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@dworkin.(none)>2009-05-12 21:32:33 -0400
committerDerrell Lipman <derrell@dworkin.(none)>2009-05-12 21:32:33 -0400
commit7c39e450fc4216e1138e4f30d2c1e2b6ba3854a8 (patch)
tree9771cfd728017349e8bf6c5dbb00309190620a08 /lib
parent8a60c26c7cb788fe181fb8db10e454b96dda23a9 (diff)
downloadsamba-7c39e450fc4216e1138e4f30d2c1e2b6ba3854a8.tar.gz
samba-7c39e450fc4216e1138e4f30d2c1e2b6ba3854a8.tar.bz2
samba-7c39e450fc4216e1138e4f30d2c1e2b6ba3854a8.zip
Fix broken smb_thread_once function (again)
- 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
Diffstat (limited to 'lib')
-rw-r--r--lib/util/smb_threads.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util/smb_threads.c b/lib/util/smb_threads.c
index 6f84a2e747..e2d01f775a 100644
--- 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 */