1 #include <boost/thread.hpp>
4 #include "module_settings.h"
10 // TODO: Fix this shit!!!
11 #include "../../../settings.h"
13 #include "stgconfig.h"
15 STGCONFIG2::STGCONFIG2()
21 ct(admins, tariffs, users, stgSettings)
23 thread = new boost::thread;
26 STGCONFIG2::~STGCONFIG2()
31 int STGCONFIG2::ParseSettings()
36 int STGCONFIG2::Start()
38 ct.SetClasses(admins, tariffs, users, stgSettings);
39 *thread = boost::thread(boost::ref(ct));
43 int STGCONFIG2::Stop()
46 if (!thread->timed_join(boost::get_system_time() + boost::posix_time::milliseconds(5000))) {
48 printfd(__FILE__, "STGCONFIG2::Stop() Thread not stopped.\n");
49 errorStr = "Failed to stop config thread.";
55 bool STGCONFIG2::IsRunning()