34 |
|
int work_(const Share& share); |
35 |
|
void sleep(); |
36 |
|
public: |
37 |
< |
Daemon(const api::Path& config) : config(config), running(true), loaded(false), interval(60), count(0), thread(new api::Thread(etl::BindAll(&Daemon::loop, this))) {} |
37 |
> |
Daemon(const api::Path& config) : config(config), running(true), loaded(false), interval(60), /*count(0),*/ thread(new api::Thread(etl::BindAll(&Daemon::loop, this))) {} |
38 |
|
~Daemon(); |
39 |
|
static ext::RedBlackSet<Share> shares; |
40 |
|
// static api::ThreadMutex smbcLock; |
41 |
|
#ifdef __FreeBSD__ |
42 |
|
static ext::String secret; |
43 |
+ |
static api::ThreadMutex secretLock; |
44 |
+ |
#else |
45 |
+ |
static ext::RedBlackMap<ext::String, ext::String> secrets; |
46 |
+ |
static api::ThreadMutex secretsLock; |
47 |
|
#endif |
48 |
|
void reload() { loaded = false; } |
49 |
|
void stop() { running = false; } |