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

Diff of /smsdaemon/main.cpp

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

revision 211 by torben, Sun Dec 21 22:08:20 2008 UTC revision 214 by torben, Mon Dec 22 22:22:42 2008 UTC
# Line 34  void openModemPort() Line 34  void openModemPort()
34          Common* cmn = Common::instance();          Common* cmn = Common::instance();
35          ConfigFile* config = cmn->GetConfigfile();          ConfigFile* config = cmn->GetConfigfile();
36    
37          port = new SerialPort ( config->GetValue("gsmmodem","serialport") );          std::string portstr = config->GetValue("gsmmodem","serialport","");
38            if (portstr == "")
39            {
40                    Logger::logMessage("'serialport' not defined in config file");
41                    sms_exit(2);
42            }
43    
44            port = new SerialPort ( portstr );
45          try          try
46          {          {
47                  port->Open( SerialPort::BAUD_9600,                  port->Open( SerialPort::BAUD_9600,
# Line 95  int main(int argc, char* argv[]) Line 102  int main(int argc, char* argv[])
102    
103    
104          /////////////////////          /////////////////////
105          string transconf = config->GetValue("smsdaemon", "transceiver");          string transconf = config->GetValue("smsdaemon", "transceiver", "");
106    
107            if (transconf == "")
108          if (transconf == "internal")          {
109                    Logger::logMessage("No transceiver defined in config file");
110                    exit(1);
111            }
112            else if (transconf == "internal")
113          {          {
114                  openModemPort();                  openModemPort();
115                  closeModemPort();                  closeModemPort();

Legend:
Removed from v.211  
changed lines
  Added in v.214

  ViewVC Help
Powered by ViewVC 1.1.20