version 1.132, 2012/07/03 11:53:22
|
version 1.135, 2012/12/13 14:38:55
|
|
|
memset(&in6addr, 0, sizeof(sockaddr_in6)); | memset(&in6addr, 0, sizeof(sockaddr_in6)); |
if(_listenAddress ->isHostAddLinkLocal()) | if(_listenAddress ->isHostAddLinkLocal()) |
{ | { |
::inet_pton(AF_INET6, |
HostAddress::convertTextToBinary(AF_INET6, |
(const char*)ip, | (const char*)ip, |
&in6addr.sin6_addr); | &in6addr.sin6_addr); |
reinterpret_cast<struct sockaddr_in6*>( | reinterpret_cast<struct sockaddr_in6*>( |
|
|
} | } |
else | else |
{ | { |
::inet_pton(AF_INET6, |
HostAddress::convertTextToBinary(AF_INET6, |
(const char*)ip, | (const char*)ip, |
&in6addr.sin6_addr); | &in6addr.sin6_addr); |
reinterpret_cast<struct sockaddr_in6*>( | reinterpret_cast<struct sockaddr_in6*>( |
|
|
String hostAdd = _listenAddress->getHost(); | String hostAdd = _listenAddress->getHost(); |
CString ip = hostAdd.getCString(); | CString ip = hostAdd.getCString(); |
struct sockaddr_in addrs; | struct sockaddr_in addrs; |
::inet_pton( |
HostAddress::convertTextToBinary( |
AF_INET, | AF_INET, |
(const char*)ip, | (const char*)ip, |
&addrs.sin_addr); | &addrs.sin_addr); |
|
|
| |
if (-1 == ( _entry_index = _monitor->solicitSocketMessages( | if (-1 == ( _entry_index = _monitor->solicitSocketMessages( |
_rep->socket, | _rep->socket, |
SocketMessage::READ | SocketMessage::EXCEPTION, |
|
getQueueId(), | getQueueId(), |
MonitorEntry::TYPE_ACCEPTOR))) | MonitorEntry::TYPE_ACCEPTOR))) |
{ | { |
|
|
{ | { |
#ifdef PEGASUS_ENABLE_IPV6 | #ifdef PEGASUS_ENABLE_IPV6 |
char ipBuffer[PEGASUS_INET6_ADDRSTR_LEN]; | char ipBuffer[PEGASUS_INET6_ADDRSTR_LEN]; |
int rc; |
if (System::getNameInfo(accept_address, |
if ((rc = System::getNameInfo(accept_address, |
|
address_size, | address_size, |
ipBuffer, | ipBuffer, |
PEGASUS_INET6_ADDRSTR_LEN, | PEGASUS_INET6_ADDRSTR_LEN, |
0, | 0, |
0, | 0, |
NI_NUMERICHOST))) |
NI_NUMERICHOST)) |
{ | { |
PEG_TRACE(( |
|
TRC_DISCARDED_DATA, |
|
Tracer::LEVEL1, |
|
"HTTPAcceptor: getnameinfo() failed. rc: %d", |
|
rc)); |
|
delete accept_address; | delete accept_address; |
return; | return; |
} | } |
|
|
| |
if (-1 == (index = _monitor->solicitSocketMessages( | if (-1 == (index = _monitor->solicitSocketMessages( |
connection->getSocket(), | connection->getSocket(), |
SocketMessage::READ | SocketMessage::EXCEPTION, |
|
connection->getQueueId(), MonitorEntry::TYPE_CONNECTION)) ) | connection->getQueueId(), MonitorEntry::TYPE_CONNECTION)) ) |
{ | { |
PEG_TRACE_CSTRING(TRC_DISCARDED_DATA, Tracer::LEVEL1, | PEG_TRACE_CSTRING(TRC_DISCARDED_DATA, Tracer::LEVEL1, |