/[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 216 by torben, Tue Dec 23 12:09:08 2008 UTC
# Line 77  void SmsDaemon::MainLoop() Line 77  void SmsDaemon::MainLoop()
77  {  {
78          Common* cmn = Common::instance();          Common* cmn = Common::instance();
79          volatile bool& mainContinue = cmn->mainContinue;          volatile bool& mainContinue = cmn->mainContinue;
80            volatile bool& reloadConfig = cmn->reloadConfig;
81    
82          mainContinue = true;          mainContinue = true;
83    
# Line 91  void SmsDaemon::MainLoop() Line 91  void SmsDaemon::MainLoop()
91                  if (cmn->isDebug && kbhit())                  if (cmn->isDebug && kbhit())
92                          break;                          break;
93    
94                    if (reloadConfig)
95                            ReloadConfig();
96    
97                  Util::Sleep(100);                  Util::Sleep(100);
98    
99          }          }
100  }  }
101    
102    void SmsDaemon::ReloadConfig()
103    {
104            Common* cmn = Common::instance();
105            cmn->reloadConfig = false;
106    
107            cmn->GetConfigfile()->Reload();
108    
109            cmn->GetPluginManager()->DestroyPlugins();
110            cmn->GetPluginManager()->LoadPlugins();
111    
112            cmn->GetTaskManager()->DestroyTasks();
113            cmn->GetTaskManager()->LoadTasks();
114    
115            cmn->LoadLists(); //reload blaclist & privileged list
116    }
117    
118  void SmsDaemon::Start()  void SmsDaemon::Start()
119  {  {
120          Common* cmn = Common::instance();          Common* cmn = Common::instance();
# Line 111  void SmsDaemon::Start() Line 130  void SmsDaemon::Start()
130          Logger::logMessage( SVNVERSION );          Logger::logMessage( SVNVERSION );
131          Logger::logMessage( string("Transceiver: ") + transceiver );          Logger::logMessage( string("Transceiver: ") + transceiver );
132    
133            cmn->LoadLists(); //reload blaclist & privileged list
134          cmn->GetTaskManager()->LoadTasks();          cmn->GetTaskManager()->LoadTasks();
135          cmn->GetPluginManager()->LoadPlugins();          cmn->GetPluginManager()->LoadPlugins();
136          Logger::logMessage("SMS daemon started");          Logger::logMessage("SMS daemon started");
137    
         _modem.DeleteAllSms();  
138    
139          try          try
140          {          {

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

  ViewVC Help
Powered by ViewVC 1.1.20