version 1.106.2.2, 2008/01/02 21:00:39
|
version 1.112, 2008/01/25 18:54:22
|
|
|
_rep->socket, | _rep->socket, |
SocketMessage::READ | SocketMessage::EXCEPTION, | SocketMessage::READ | SocketMessage::EXCEPTION, |
getQueueId(), | getQueueId(), |
Monitor::ACCEPTOR))) |
MonitorEntry::TYPE_ACCEPTOR))) |
{ | { |
Socket::close(_rep->socket); | Socket::close(_rep->socket); |
delete _rep; | delete _rep; |
|
|
if (_rep) | if (_rep) |
{ | { |
AutoMutex autoMut(_rep->_connection_mut); | AutoMutex autoMut(_rep->_connection_mut); |
if (_rep->connections.size() > 0) |
for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++) |
|
{ |
|
HTTPConnection* connection = _rep->connections[i]; |
|
if (connection->isResponsePending()) |
{ | { |
HTTPConnection* connection = _rep->connections[0]; |
count++; |
count = connection->getRequestCount(); |
} |
} | } |
} | } |
return count; | return count; |
|
|
"HTTPAcceptor: accept() failed"); | "HTTPAcceptor: accept() failed"); |
return; | return; |
} | } |
|
#ifndef(PEGASUS_OS_TYPE_WINDOWS) |
|
// We need to ensure that the socket number is not higher than |
|
// what fits into FD_SETSIZE, because we else won't be able to select on it |
|
// and won't ever communicate correct on that socket. |
|
if (socket >= FD_SETSIZE) |
|
{ |
|
// the remote connection is invalid, destroy client address. |
|
delete accept_address; |
|
|
|
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
"HTTPAcceptor out of available sockets. " |
|
"Closing connection to the new client."); |
|
|
|
PEG_TRACE( |
|
(TRC_DISCARDED_DATA, |
|
Tracer::LEVEL2, |
|
"accept() returned too large socket number %d.", |
|
socket)); |
|
|
|
// close the connection |
|
Socket::close(socket); |
|
return; |
|
} |
|
#endif |
| |
String ipAddress; | String ipAddress; |
| |
|
|
if (-1 == (index = _monitor->solicitSocketMessages( | if (-1 == (index = _monitor->solicitSocketMessages( |
connection->getSocket(), | connection->getSocket(), |
SocketMessage::READ | SocketMessage::EXCEPTION, | SocketMessage::READ | SocketMessage::EXCEPTION, |
connection->getQueueId(), Monitor::CONNECTION)) ) |
connection->getQueueId(), MonitorEntry::TYPE_CONNECTION)) ) |
{ | { |
// ATTN-DE-P2-2003100503::TODO::Need to enhance code to return | // ATTN-DE-P2-2003100503::TODO::Need to enhance code to return |
// an error message to Client application. | // an error message to Client application. |