/[projects]/smsdaemon/SmsDaemon.cpp
ViewVC logotype

Diff of /smsdaemon/SmsDaemon.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 205 by torben, Fri Dec 19 22:29:25 2008 UTC revision 217 by torben, Tue Dec 23 14:20:43 2008 UTC
# Line 18  Line 18 
18  #include "PluginManager.h"  #include "PluginManager.h"
19  #include "ConfigFile.h"  #include "ConfigFile.h"
20  #include "Logger.h"  #include "Logger.h"
21    #include "AccessManager.h"
22    
23  #include "version.h"  #include "version.h"
24    
# Line 77  void SmsDaemon::MainLoop() Line 78  void SmsDaemon::MainLoop()
78  {  {
79          Common* cmn = Common::instance();          Common* cmn = Common::instance();
80          volatile bool& mainContinue = cmn->mainContinue;          volatile bool& mainContinue = cmn->mainContinue;
81            volatile bool& reloadConfig = cmn->reloadConfig;
82    
83          mainContinue = true;          mainContinue = true;
84    
# Line 91  void SmsDaemon::MainLoop() Line 92  void SmsDaemon::MainLoop()
92                  if (cmn->isDebug && kbhit())                  if (cmn->isDebug && kbhit())
93                          break;                          break;
94    
95                    if (reloadConfig)
96                            ReloadConfig();
97    
98                  Util::Sleep(100);                  Util::Sleep(100);
99    
100          }          }
101  }  }
102    
103    void SmsDaemon::ReloadConfig()
104    {
105            Common* cmn = Common::instance();
106            cmn->reloadConfig = false;
107    
108            cmn->GetConfigfile()->Reload();
109    
110            cmn->GetPluginManager()->DestroyPlugins();
111            cmn->GetPluginManager()->LoadPlugins();
112    
113            cmn->GetTaskManager()->DestroyTasks();
114            cmn->GetTaskManager()->LoadTasks();
115    
116            AccessManager::Load(); //reload blaclist & privileged list
117    }
118    
119  void SmsDaemon::Start()  void SmsDaemon::Start()
120  {  {
121          Common* cmn = Common::instance();          Common* cmn = Common::instance();
# Line 111  void SmsDaemon::Start() Line 131  void SmsDaemon::Start()
131          Logger::logMessage( SVNVERSION );          Logger::logMessage( SVNVERSION );
132          Logger::logMessage( string("Transceiver: ") + transceiver );          Logger::logMessage( string("Transceiver: ") + transceiver );
133    
134            AccessManager::Load(); //reload blaclist & privileged list
135          cmn->GetTaskManager()->LoadTasks();          cmn->GetTaskManager()->LoadTasks();
136          cmn->GetPluginManager()->LoadPlugins();          cmn->GetPluginManager()->LoadPlugins();
137          Logger::logMessage("SMS daemon started");          Logger::logMessage("SMS daemon started");
138    
         _modem.DeleteAllSms();  
139    
140          try          try
141          {          {

Legend:
Removed from v.205  
changed lines
  Added in v.217

  ViewVC Help
Powered by ViewVC 1.1.20