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

Diff of /smsdaemon/main.cpp

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

revision 158 by torben, Mon Dec 8 21:49:49 2008 UTC revision 175 by torben, Wed Dec 10 22:02:28 2008 UTC
# Line 1  Line 1 
1  #include <string>  #include <string>
2  #include <stdlib.h>  #include <stdlib.h>
3    #include <iostream>
4    
5  #include "daemon.h"  #include "daemon.h"
6  #include "Common.h"  #include "Common.h"
# Line 32  void openModemPort() Line 33  void openModemPort()
33          Common* cmn = Common::instance();          Common* cmn = Common::instance();
34          ConfigFile* config = cmn->GetConfigfile();          ConfigFile* config = cmn->GetConfigfile();
35    
36          port = new SerialPort ( config->GetValue("smsdaemon","serialport") );          port = new SerialPort ( config->GetValue("gsmmodem","serialport") );
37          try          try
38          {          {
39                  port->Open( SerialPort::BAUD_9600,                  port->Open( SerialPort::BAUD_9600,
# Line 84  int main(int argc, char* argv[]) Line 85  int main(int argc, char* argv[])
85                    
86          bool res = config->Open( cmn->configFilePath ) ;          bool res = config->Open( cmn->configFilePath ) ;
87          if (!res) {          if (!res) {
88                  Logger::logMessage(string("Could not open config file:") + cmn->configFilePath);                  cout << "Could not open config file:" << cmn->configFilePath << endl;
89                  return 1;                  return 1;
90          }          }
91    
92            Logger::initLog();
93                    
94    
95          /////////////////////          /////////////////////

Legend:
Removed from v.158  
changed lines
  Added in v.175

  ViewVC Help
Powered by ViewVC 1.1.20