3
#include "AppSubsystem.hxx"
6
#include <rutil/Log.hxx>
7
#include <rutil/Logger.hxx>
8
#include <rutil/DnsUtil.hxx>
9
#include <rutil/BaseException.hxx>
10
#include <resip/stack/NameAddr.hxx>
11
#include <rutil/WinLeakCheck.hxx>
13
using namespace clicktocall;
14
using namespace resip;
17
#define RESIPROCATE_SUBSYSTEM AppSubsystem::CLICKTOCALL
19
void sleepSeconds(unsigned int seconds)
28
static bool finished = false;
31
signalHandler(int signo)
33
std::cerr << "Shutting down..." << endl;
38
main (int argc, char** argv)
41
if ( signal( SIGPIPE, SIG_IGN) == SIG_ERR)
43
cerr << "Couldn't install signal handler for SIGPIPE" << endl;
47
#if defined(_DEBUG) && defined(LEAK_CHECK)
48
resip::FindMemoryLeaks fml;
52
if ( signal( SIGINT, signalHandler ) == SIG_ERR )
54
cerr << "Couldn't install signal handler for SIGINT" << endl;
58
if ( signal( SIGTERM, signalHandler ) == SIG_ERR )
60
cerr << "Couldn't install signal handler for SIGTERM" << endl;
66
//////////////////////////////////////////////////////////////////////////////
68
//////////////////////////////////////////////////////////////////////////////
70
Server server(argc, argv);
72
//////////////////////////////////////////////////////////////////////////////
74
//////////////////////////////////////////////////////////////////////////////
87
InfoLog(<< "ClickToCall server is shutdown.");
91
/* ====================================================================
93
Copyright (c) 2009, SIP Spectrum, Inc.
96
Redistribution and use in source and binary forms, with or without
97
modification, are permitted provided that the following conditions are
100
1. Redistributions of source code must retain the above copyright
101
notice, this list of conditions and the following disclaimer.
103
2. Redistributions in binary form must reproduce the above copyright
104
notice, this list of conditions and the following disclaimer in the
105
documentation and/or other materials provided with the distribution.
107
3. Neither the name of SIP Spectrum nor the names of its contributors
108
may be used to endorse or promote products derived from this
109
software without specific prior written permission.
111
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
112
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
113
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
114
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
115
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
116
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
117
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
118
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
119
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
120
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
121
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
123
==================================================================== */