/[resiprocate]/main/resip/dum/test/limpc.cxx
ViewVC logotype

Diff of /main/resip/dum/test/limpc.cxx

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

revision 5929 by dworley, Thu Feb 16 22:36:43 2006 UTC revision 8228 by bcampen, Tue Sep 23 08:30:37 2008 UTC
# Line 11  Line 11 
11  #endif  #endif
12    
13  #include "UserAgent.hxx"  #include "UserAgent.hxx"
 #include "resip/stack/Security.hxx"  
14  #include "resip/stack/SipStack.hxx"  #include "resip/stack/SipStack.hxx"
15  #include "resip/stack/Uri.hxx"  #include "resip/stack/Uri.hxx"
16  #include "rutil/Logger.hxx"  #include "rutil/Logger.hxx"
17    
18    #ifdef USE_SSL
19    #include "resip/stack/ssl/Security.hxx"
20    #endif
21    
22    #include <signal.h>
23    
24  using namespace resip;  using namespace resip;
25  using namespace std;  using namespace std;
26    
27  #define RESIPROCATE_SUBSYSTEM Subsystem::SIP  #define RESIPROCATE_SUBSYSTEM Subsystem::SIP
28    
29    static bool finished = false;
30    
31    static void
32    signalHandler(int signo)
33    {
34       std::cerr << "Shutting down" << endl;
35       finished = true;
36    }
37    
38  int  int
39  main(int argc, char* argv[])  main(int argc, char* argv[])
40  {  {
41    #ifndef _WIN32
42       if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
43       {
44          cerr << "Couldn't install signal handler for SIGPIPE" << endl;
45          exit(-1);
46       }
47    #endif
48    
49       if ( signal( SIGINT, signalHandler ) == SIG_ERR )
50       {
51          cerr << "Couldn't install signal handler for SIGINT" << endl;
52          exit( -1 );
53       }
54    
55       if ( signal( SIGTERM, signalHandler ) == SIG_ERR )
56       {
57          cerr << "Couldn't install signal handler for SIGTERM" << endl;
58          exit( -1 );
59       }
60    
61     try     try
62     {     {
63        UserAgent ua(argc, argv);        UserAgent ua(argc, argv);
64        ua.startup();        ua.startup();
65                
66        InfoLog(<< argv[0] << " starting");        InfoLog(<< argv[0] << " starting");
67        while(1)        while(!finished)
68        {        {
69           ua.process();           ua.process();
70        }        }

Legend:
Removed from v.5929  
changed lines
  Added in v.8228

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27