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

Diff of /smsdaemon/SmsDaemon.cpp

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

revision 157 by torben, Mon Dec 8 21:28:40 2008 UTC revision 196 by torben, Thu Dec 18 06:53:29 2008 UTC
# Line 5  Line 5 
5  #include <sstream>  #include <sstream>
6  #include <stdlib.h>  #include <stdlib.h>
7    
8  #include "common.h"  #include "Common.h"
9    
10  #include "ISmsTransceiver.h"  #include "ISmsTransceiver.h"
11    
12  #include "Plugin.h"  #include "Plugin.h"
13  #include "kbhit.h"  #include "kbhit.h"
14    
15  #include "util.h"  #include "Util.h"
16    
17  #include "TaskManager.h"  #include "TaskManager.h"
18  #include "PluginManager.h"  #include "PluginManager.h"
# Line 52  void SmsDaemon::CheckSms() Line 52  void SmsDaemon::CheckSms()
52          for (unsigned int i=0; i<sms.size(); ++i)          for (unsigned int i=0; i<sms.size(); ++i)
53          {          {
54                  string cmd = sms[i].ExtractCommand();                  string cmd = sms[i].ExtractCommand();
55                            
56                  cmd = Util::str_tolower(cmd);                  cmd = Util::str_tolower(cmd);
57    
58                  Plugin* pl = manager->GetPlugin(cmd);                  Plugin* pl = manager->GetPlugin(cmd);
# Line 68  void SmsDaemon::CheckSms() Line 68  void SmsDaemon::CheckSms()
68                          _modem.SendSms(sms[i].GetSender(), "Unknown command!", false);                          _modem.SendSms(sms[i].GetSender(), "Unknown command!", false);
69                  }                  }
70    
                 _modem.DeleteSms(sms[i].GetIndex());  
71                  cmn->smsCounter.incomming++;                  cmn->smsCounter.incomming++;
72          }          }
73  }  }
# Line 117  void SmsDaemon::Start() Line 116  void SmsDaemon::Start()
116          Logger::logMessage("SMS daemon started");          Logger::logMessage("SMS daemon started");
117    
118          _modem.DeleteAllSms();          _modem.DeleteAllSms();
119            
120          try          try
121          {          {
122                  MainLoop();                  MainLoop();

Legend:
Removed from v.157  
changed lines
  Added in v.196

  ViewVC Help
Powered by ViewVC 1.1.20