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

Diff of /smsdaemon/main.cpp

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

revision 154 by torben, Mon Dec 8 13:48:52 2008 UTC revision 157 by torben, Mon Dec 8 21:28:40 2008 UTC
# Line 3  Line 3 
3    
4  #include "daemon.h"  #include "daemon.h"
5  #include "common.h"  #include "common.h"
6    #include "Logger.h"
7    
8  #include "ModemTransceiver.h"  #include "ModemTransceiver.h"
9  #include "DebugTransceiver.h"  #include "DebugTransceiver.h"
# Line 42  void openModemPort() Line 43  void openModemPort()
43          }          }
44          catch(std::exception &e)          catch(std::exception &e)
45          {          {
46                  cmn->logMessage( string("PortOpen Exception: ") + e.what() );                  Logger::logMessage( string("PortOpen Exception: ") + e.what() );
47                  sms_exit(1);                  sms_exit(1);
48          }          }
49    
# Line 54  void openModemPort() Line 55  void openModemPort()
55          }          }
56          catch (std::exception& e)          catch (std::exception& e)
57          {          {
58                  cmn->logMessage( string("ModemTransceiver Exception: ") + e.what() );                  Logger::logMessage( string("ModemTransceiver Exception: ") + e.what() );
59                  sms_exit(2);                  sms_exit(2);
60          }          }
61  }  }
# Line 71  int main(int argc, char* argv[]) Line 72  int main(int argc, char* argv[])
72    
73          //Set default values          //Set default values
74    
75          cmn->setLogfile( "/var/log/smsdaemon.log");          Logger::setLogfile( "/var/log/smsdaemon.log");
76          cmn->pidfile = "/var/run/smsdaemon.pid";          cmn->pidfile = "/var/run/smsdaemon.pid";
77          cmn->spooldir = "/var/spool/smsdaemon";          cmn->spooldir = "/var/spool/smsdaemon";
78    
# Line 83  int main(int argc, char* argv[]) Line 84  int main(int argc, char* argv[])
84                    
85          bool res = config->Open( cmn->configFilePath ) ;          bool res = config->Open( cmn->configFilePath ) ;
86          if (!res) {          if (!res) {
87                  cmn->logMessage(string("Could not open config file:") + cmn->configFilePath);                  Logger::logMessage(string("Could not open config file:") + cmn->configFilePath);
88                  return 1;                  return 1;
89          }          }
90                    
# Line 103  int main(int argc, char* argv[]) Line 104  int main(int argc, char* argv[])
104          }          }
105          else          else
106          {          {
107                  cmn->logMessage( string("Invalid transceiver setting: ")+transconf);                  Logger::logMessage( string("Invalid transceiver setting: ")+transconf);
108                  exit(1);                  exit(1);
109          }          }
110    

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

  ViewVC Help
Powered by ViewVC 1.1.20