diff options
author | Derrell Lipman <derrell@dworkin.(none)> | 2009-05-12 21:32:33 -0400 |
---|---|---|
committer | Derrell Lipman <derrell@dworkin.(none)> | 2009-05-12 21:32:33 -0400 |
commit | 7c39e450fc4216e1138e4f30d2c1e2b6ba3854a8 (patch) | |
tree | 9771cfd728017349e8bf6c5dbb00309190620a08 /lib/util | |
parent | 8a60c26c7cb788fe181fb8db10e454b96dda23a9 (diff) | |
download | samba-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/util')
-rw-r--r-- | lib/util/smb_threads.c | 3 |
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 */ |