version 1.46.4.2, 2007/07/03 21:50:07
|
version 1.47.6.1, 2007/06/08 12:47:52
|
|
|
SSLContext *_sslContext; | SSLContext *_sslContext; |
Monitor *_monitor; | Monitor *_monitor; |
Mutex _monitorMutex; | Mutex _monitorMutex; |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
HTTPAcceptor *_ip6Acceptor; | HTTPAcceptor *_ip6Acceptor; |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
HTTPAcceptor *_ip4Acceptor; | HTTPAcceptor *_ip4Acceptor; |
#endif | #endif |
Boolean _dieNow; | Boolean _dieNow; |
|
|
_portNumber(portNumber), | _portNumber(portNumber), |
_sslContext(sslContext), | _sslContext(sslContext), |
_monitor(NULL), | _monitor(NULL), |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
_ip6Acceptor(NULL), | _ip6Acceptor(NULL), |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
_ip4Acceptor(NULL), | _ip4Acceptor(NULL), |
#endif | #endif |
_dieNow(false), | _dieNow(false), |
|
|
_portNumber(svc._portNumber), | _portNumber(svc._portNumber), |
_sslContext(svc._sslContext), | _sslContext(svc._sslContext), |
_monitor(NULL), | _monitor(NULL), |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
_ip6Acceptor(NULL), | _ip6Acceptor(NULL), |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
_ip4Acceptor(NULL), | _ip4Acceptor(NULL), |
#endif | #endif |
_dieNow(svc._dieNow), | _dieNow(svc._dieNow), |
|
|
{ | { |
delete _responseEncoder; | delete _responseEncoder; |
delete _requestDecoder; | delete _requestDecoder; |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
delete _ip6Acceptor; | delete _ip6Acceptor; |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
delete _ip4Acceptor; | delete _ip4Acceptor; |
#endif | #endif |
delete _monitor; | delete _monitor; |
|
|
_requestDecoder = new CIMExportRequestDecoder( | _requestDecoder = new CIMExportRequestDecoder( |
_dispatcher, _responseEncoder->getQueueId()); | _dispatcher, _responseEncoder->getQueueId()); |
} | } |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
if (NULL == _ip6Acceptor) | if (NULL == _ip6Acceptor) |
{ | { |
_ip6Acceptor = new HTTPAcceptor( | _ip6Acceptor = new HTTPAcceptor( |
|
|
_portNumber, _sslContext, false); | _portNumber, _sslContext, false); |
} | } |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
if (NULL == _ip4Acceptor) | if (NULL == _ip4Acceptor) |
{ | { |
_ip4Acceptor = new HTTPAcceptor( | _ip4Acceptor = new HTTPAcceptor( |
|
|
| |
void CIMListenerService::bind() | void CIMListenerService::bind() |
{ | { |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
if (_ip6Acceptor != NULL) | if (_ip6Acceptor != NULL) |
{ | { |
_ip6Acceptor->bind(); | _ip6Acceptor->bind(); |
|
|
_portNumber); | _portNumber); |
} | } |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
if (_ip4Acceptor != NULL) | if (_ip4Acceptor != NULL) |
{ | { |
_ip4Acceptor->bind(); | _ip4Acceptor->bind(); |
|
|
void CIMListenerService::resume() | void CIMListenerService::resume() |
{ | { |
PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::resume()"); | PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::resume()"); |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
if (_ip6Acceptor != NULL) | if (_ip6Acceptor != NULL) |
{ | { |
_ip6Acceptor->reopenConnectionSocket(); | _ip6Acceptor->reopenConnectionSocket(); |
} | } |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
if (_ip4Acceptor != NULL) | if (_ip4Acceptor != NULL) |
{ | { |
_ip4Acceptor->reopenConnectionSocket(); | _ip4Acceptor->reopenConnectionSocket(); |
|
|
| |
// tell Monitor to stop listening for client connections | // tell Monitor to stop listening for client connections |
_monitor->stopListeningForConnections(true); | _monitor->stopListeningForConnections(true); |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
if (_ip6Acceptor != NULL) | if (_ip6Acceptor != NULL) |
{ | { |
_ip6Acceptor->closeConnectionSocket(); | _ip6Acceptor->closeConnectionSocket(); |
} | } |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
if (_ip4Acceptor != NULL) | if (_ip4Acceptor != NULL) |
{ | { |
_ip4Acceptor->closeConnectionSocket(); | _ip4Acceptor->closeConnectionSocket(); |
|
|
Uint32 CIMListenerService::getOutstandingRequestCount() | Uint32 CIMListenerService::getOutstandingRequestCount() |
{ | { |
Uint32 cnt = 0; | Uint32 cnt = 0; |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
cnt = _ip6Acceptor->getOutstandingRequestCount(); | cnt = _ip6Acceptor->getOutstandingRequestCount(); |
#endif | #endif |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
cnt += _ip4Acceptor->getOutstandingRequestCount(); | cnt += _ip4Acceptor->getOutstandingRequestCount(); |
#endif | #endif |
| |
|
|
{ | { |
Uint32 portNumber = _portNumber; | Uint32 portNumber = _portNumber; |
| |
#ifdef PEGASUS_ENABLE_IPV6 |
#ifndef PEGASUS_DISABLE_IPV6 |
if ((portNumber == 0) && (_ip6Acceptor != 0)) | if ((portNumber == 0) && (_ip6Acceptor != 0)) |
{ | { |
portNumber = _ip6Acceptor->getPortNumber(); | portNumber = _ip6Acceptor->getPortNumber(); |
} | } |
#endif | #endif |
| |
#if !defined (PEGASUS_ENABLE_IPV6) || defined (PEGASUS_OS_TYPE_WINDOWS) |
#if !defined (PEGASUS_DISABLE_IPV6) && defined (PEGASUS_OS_TYPE_WINDOWS) \ |
|
|| defined (PEGASUS_DISABLE_IPV6) |
if ((portNumber == 0) && (_ip4Acceptor != 0)) | if ((portNumber == 0) && (_ip4Acceptor != 0)) |
{ | { |
portNumber = _ip4Acceptor->getPortNumber(); | portNumber = _ip4Acceptor->getPortNumber(); |