|
reSIProcate/DialogUsageManager
9694
|
#include <cstring>#include <cassert>#include "UserAgent.hxx"#include "resip/stack/SipStack.hxx"#include "resip/stack/Uri.hxx"#include "rutil/Logger.hxx"#include <signal.h>
Go to the source code of this file.
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::SIP |
Functions | |
| static void | signalHandler (int signo) |
| int | main (int argc, char *argv[]) |
Variables | |
| bool | TRUE = true |
| bool | FALSE = false |
| static bool | finished = false |
| #define RESIPROCATE_SUBSYSTEM Subsystem::SIP |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 39 of file limpc.cxx.
References ErrLog, finished, InfoLog, resip::UserAgent::process(), signalHandler(), resip::UserAgent::startup(), and WarningLog.
{
#ifndef _WIN32
if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
{
cerr << "Couldn't install signal handler for SIGPIPE" << endl;
exit(-1);
}
#endif
if ( signal( SIGINT, signalHandler ) == SIG_ERR )
{
cerr << "Couldn't install signal handler for SIGINT" << endl;
exit( -1 );
}
if ( signal( SIGTERM, signalHandler ) == SIG_ERR )
{
cerr << "Couldn't install signal handler for SIGTERM" << endl;
exit( -1 );
}
try
{
UserAgent ua(argc, argv);
ua.startup();
InfoLog(<< argv[0] << " starting");
while(!finished)
{
ua.process();
}
}
catch (BaseSecurity::Exception& e)
{
WarningLog (<< "Couldn't set up security object");
exit(-1);
}
catch (BaseException& e)
{
ErrLog (<< "Caught: " << e);
exit(-1);
}
catch( ... )
{
ErrLog( << "Caught non-resip exception" );
exit(-1);
}
return 0;
}

| static void signalHandler | ( | int | signo | ) | [static] |
bool finished = false [static] |
Definition at line 29 of file limpc.cxx.
Referenced by main(), and signalHandler().
1.7.5.1