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

Diff of /smsdaemon/SmsDaemon.cpp

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

revision 132 by torben, Sun Dec 7 00:59:05 2008 UTC revision 142 by torben, Sun Dec 7 15:51:02 2008 UTC
# Line 24  using namespace std; Line 24  using namespace std;
24  void SmsDaemon::CreateLogMessage(SMS& sms,bool hasPlugin)  void SmsDaemon::CreateLogMessage(SMS& sms,bool hasPlugin)
25  {  {
26          ostringstream os;          ostringstream os;
27          os << "Recieved sms from " << sms.sender << " ; command=" << GetSmsCommand(sms);          os << "Recieved sms from " << sms.GetSender() << " ; command=" << sms.ExtractCommand();
28          if (!hasPlugin)          if (!hasPlugin)
29                  os << " -- PLUGIN NOT FOUND";                  os << " -- PLUGIN NOT FOUND";
30    
# Line 49  void SmsDaemon::CheckSms() Line 49  void SmsDaemon::CheckSms()
49    
50          for (unsigned int i=0; i<sms.size(); ++i)          for (unsigned int i=0; i<sms.size(); ++i)
51          {          {
52                  string cmd = GetSmsCommand(sms[i]);                  string cmd = sms[i].ExtractCommand();
53                                                    
54                  cmd = Util::str_tolower(cmd);                  cmd = Util::str_tolower(cmd);
55    
# Line 63  void SmsDaemon::CheckSms() Line 63  void SmsDaemon::CheckSms()
63                  }                  }
64                  else                  else
65                  {                  {
66                          _modem.SendSms(sms[i].sender, "Unknown command!", false);                          _modem.SendSms(sms[i].GetSender(), "Unknown command!", false);
67                  }                  }
68    
69                  _modem.DeleteSms(sms[i].sms_index);                  _modem.DeleteSms(sms[i].GetIndex());
70                  cmn->smsCounter.incomming++;                  cmn->smsCounter.incomming++;
71          }          }
72  }  }

Legend:
Removed from v.132  
changed lines
  Added in v.142

  ViewVC Help
Powered by ViewVC 1.1.20