|
reSIProcate/DialogUsageManager
9694
|
#include <signal.h>#include "resip/stack/NameAddr.hxx"#include "resip/stack/Pkcs8Contents.hxx"#include "resip/stack/SipMessage.hxx"#include "resip/stack/Symbols.hxx"#include "resip/stack/Uri.hxx"#include "resip/stack/X509Contents.hxx"#include "resip/dum/AppDialogSet.hxx"#include "resip/dum/ClientAuthManager.hxx"#include "resip/dum/DialogUsageManager.hxx"#include "resip/dum/DumShutdownHandler.hxx"#include "resip/dum/OutOfDialogHandler.hxx"#include "resip/dum/MasterProfile.hxx"#include "resip/dum/PublicationHandler.hxx"#include "resip/dum/RegistrationHandler.hxx"#include "resip/dum/ServerPublication.hxx"#include "resip/dum/ServerSubscription.hxx"#include "resip/dum/SubscriptionHandler.hxx"#include "rutil/Log.hxx"#include "rutil/Logger.hxx"#include "rutil/Random.hxx"#include "rutil/Subsystem.hxx"
Go to the source code of this file.
Classes | |
| class | CertPublicationHandler |
| class | PrivateKeyPublicationHandler |
| class | CertSubscriptionHandler |
| class | PrivateKeySubscriptionHandler |
| class | CertServer |
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::TEST |
Functions | |
| void | signalHandler (int signo) |
| int | main (int argc, char **argv) |
Variables | |
| static bool | finished = false |
| #define RESIPROCATE_SUBSYSTEM Subsystem::TEST |
Definition at line 33 of file certServer.cxx.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 356 of file certServer.cxx.
References context, CertServer::run(), server, and signalHandler().
{
char* logType = "COUT";
char* logLevel = "DEBUG";
char* myUrl = "sip:localhost:7001";
char* bindAddr = 0;
int v6 = 0;
#if defined(HAVE_POPT_H)
struct poptOption table[] = {
{"log-type", 'l', POPT_ARG_STRING, &logType, 0, "where to send logging messages", "syslog|cerr|cout"},
{"log-level", 'v', POPT_ARG_STRING, &logLevel, 0, "specify the default log level", "DEBUG|INFO|WARNING|ALERT"},
{"name" , 'n', POPT_ARG_STRING, &myUrl, 0, "my url", 0},
{"bind", 'b', POPT_ARG_STRING, &bindAddr, 0, "interface address to bind to",0},
{"v6", '6', POPT_ARG_NONE, &v6 , 0, "ipv6", 0},
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
poptContext context = poptGetContext(NULL, argc, const_cast<const char**>(argv), table, 0);
poptGetNextOpt(context);
#endif
Log::initialize(logType, logLevel, argv[0]);
#ifndef _WIN32
if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
{
cerr << "Couldn't install signal handler for SIGPIPE" << endl;
exit(-1);
}
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 );
}
#endif
NameAddr domain(myUrl);
SipStack stack;
CertServer server(domain, stack);
server.run();
return 0;
}

| void signalHandler | ( | int | signo | ) |
Definition at line 41 of file certServer.cxx.
References finished.
Referenced by main().
{
std::cerr << "Shutting down" << endl;
finished = true;
}
bool finished = false [static] |
Definition at line 38 of file certServer.cxx.
Referenced by main(), CertServer::run(), and signalHandler().
1.7.5.1