ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Spectre2/Daemon.cpp
(Generate patch)

Comparing Spectre2/Daemon.cpp (file contents):
Revision 440 by douglas, 2005-04-07T15:56:53-07:00 vs.
Revision 441 by douglas, 2005-04-12T15:42:24-07:00

# Line 33 | Line 33 | Daemon::~Daemon()
33   }
34  
35   ext::RedBlackSet<Share> Daemon::shares;
36 //api::ThreadMutex Daemon::smbcLock;
36   #ifdef __FreeBSD__
37   ext::String Daemon::secret(api::TheEnvironment.Get("HOME") + "/.nsmbrc");
38   api::ThreadMutex Daemon::secretLock;
# Line 59 | Line 58 | int Daemon::loop()
58  
59   void Daemon::load()
60   {
61 + #ifndef __FreeBSD__
62 +        _foreach (const ext::RedBlackMap<ext::String>, secret, secrets)
63 +                api::Posix::CheckError(::unlink(secret.NullTerminate()));
64 +
65 +        secrets.Clear();
66 + #endif
67          shares.Clear();
68          Share::passwords.Clear();
69  
# Line 128 | Line 133 | int Daemon::work()
133                  _foreach (const ext::RedBlackSet<Share>, share, shares)
134                          workers.Add(etl::BindAll(&Daemon::work_<Worker>, this, *share));
135  
131                // XXX: not useful for solving the problem it was supposed to solve
132                /*_synchronized (smbcLock) if (++count % 8 == 0) try
133                {
134                        ::SMBCCTX* context(::smbc_new_context());
135
136                        context->debug = Spectre2::debug ? 2 : 0;
137                        context->callbacks.auth_fn = authenticate;
138
139                        CheckError(::smbc_init_context(context));
140
141                        ::SMBCCTX* old(::smbc_set_context(context));
142
143                        CheckError(::smbc_free_context(old, 0));
144                }
145                catch (const Error&) { --count; }*/
146
136                  if (running && loaded)
137                          sleep();
138  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines