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

Diff of /smsdaemon/main.cpp

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

revision 36 by torben, Tue Jun 10 15:34:19 2008 UTC revision 57 by torben, Wed Jun 11 16:08:37 2008 UTC
# Line 74  void main_loop(GsmModem& modem) Line 74  void main_loop(GsmModem& modem)
74          }          }
75  }  }
76    
77    bool sms_exit(int exitcode)
78    {
79        if (Common::instance()->isDaemon)
80            daemonCleanup();
81    
82            exit(exitcode);
83    }
84    
85  int main(int argc, char* argv[])  int main(int argc, char* argv[])
86  {  {
# Line 115  int main(int argc, char* argv[]) Line 122  int main(int argc, char* argv[])
122          catch(std::exception &e)          catch(std::exception &e)
123          {          {
124                  cmn->logMessage( string("PortOpen Exception: ") + e.what() );                  cmn->logMessage( string("PortOpen Exception: ") + e.what() );
125                  exit(1);                  sms_exit(1);
126          }          }
127    
128          GsmModem modem(port);          GsmModem modem(port);
129    
130            try
131            {
132                    modem.Init();
133            }
134            catch (std::exception& e)
135            {
136                    cmn->logMessage( string("GsmModem Exception: ") + e.what() );
137                    sms_exit(2);
138            }
139    
140    
141          //////////////////////////////////          //////////////////////////////////
142    

Legend:
Removed from v.36  
changed lines
  Added in v.57

  ViewVC Help
Powered by ViewVC 1.1.20