--- smsdaemon/SmsDaemon.cpp 2008/06/16 15:32:07 99 +++ smsdaemon/SmsDaemon.cpp 2008/12/07 20:58:41 149 @@ -3,9 +3,11 @@ #include #include +#include + #include "common.h" -#include "GsmModem.h" +#include "ISmsTransceiver.h" #include "Plugin.h" #include "kbhit.h" @@ -22,7 +24,7 @@ void SmsDaemon::CreateLogMessage(SMS& sms,bool hasPlugin) { ostringstream os; - os << "Recieved sms from " << sms.sender << " ; command=" << GetSmsCommand(sms); + os << "Recieved sms from " << sms.GetSender() << " ; command=" << sms.ExtractCommand(); if (!hasPlugin) os << " -- PLUGIN NOT FOUND"; @@ -32,7 +34,7 @@ void SmsDaemon::CheckSms() { - const int INTERVAL = 250; //no of milliseconds between sms checks + const int INTERVAL = 1000; //no of milliseconds between sms checks timeval now = Util::GetTimeOfDay(); if ( Util::mTimeDiff(_lastSmsCheck,now) < INTERVAL) @@ -47,7 +49,7 @@ for (unsigned int i=0; ismsCounter.incomming++; } } @@ -88,7 +90,7 @@ if (cmn->isDebug && kbhit()) break; - Util::Sleep(10); + Util::Sleep(100); } } @@ -97,13 +99,14 @@ { Common* cmn = Common::instance(); + srand(time(0)); cmn->daemonStart = time(0); _lastSmsCheck = Util::GetTimeOfDay(); cmn->logMessage("--------------------------------"); cmn->logMessage( VERSION ); - cmn->logMessage( "Svn: " SVNVER ); + cmn->logMessage( SVNVERSION ); cmn->GetTaskManager()->LoadTasks(); cmn->GetPluginManager()->LoadPlugins();