version 1.49, 2004/05/21 20:57:00
|
version 1.50, 2004/08/12 10:47:43
|
|
|
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) | // Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// Dave Rosckes (rosckes@us.ibm.com) | // Dave Rosckes (rosckes@us.ibm.com) |
// Denise Eckstein (denise.eckstein@hp.com) | // Denise Eckstein (denise.eckstein@hp.com) |
|
// Alagaraja Ramasubramanian (alags_raj@in.ibm.com) for Bug#1090 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
CloseConnectionMessage* closeConnectionMessage | CloseConnectionMessage* closeConnectionMessage |
= (CloseConnectionMessage*)message; | = (CloseConnectionMessage*)message; |
| |
_rep->_connection_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_rep->_connection_mut); |
| |
for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++) | for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++) |
{ | { |
|
|
break; | break; |
} | } |
} | } |
_rep->_connection_mut.unlock(); |
|
break; | break; |
} | } |
| |
|
|
{ | { |
Uint32 count = 0; | Uint32 count = 0; |
| |
_rep->_connection_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_rep->_connection_mut); |
if (_rep->connections.size() > 0) | if (_rep->connections.size() > 0) |
{ | { |
HTTPConnection* connection = _rep->connections[0]; | HTTPConnection* connection = _rep->connections[0]; |
count = connection->getRequestCount(); | count = connection->getRequestCount(); |
} | } |
_rep->_connection_mut.unlock(); |
|
return count; | return count; |
} | } |
| |
|
|
| |
// For each connection created by this object: | // For each connection created by this object: |
| |
_rep->_connection_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_rep->_connection_mut); |
for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++) | for (Uint32 i = 0, n = _rep->connections.size(); i < n; i++) |
{ | { |
HTTPConnection* connection = _rep->connections[i]; | HTTPConnection* connection = _rep->connections[i]; |
|
|
} | } |
| |
_rep->connections.clear(); | _rep->connections.clear(); |
_rep->_connection_mut.unlock(); |
|
} | } |
| |
void HTTPAcceptor::_acceptConnection() | void HTTPAcceptor::_acceptConnection() |
|
|
| |
// Save the socket for cleanup later: | // Save the socket for cleanup later: |
connection->_entry_index = index; | connection->_entry_index = index; |
_rep->_connection_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_rep->_connection_mut); |
_rep->connections.append(connection); | _rep->connections.append(connection); |
_rep->_connection_mut.unlock(); |
|
} | } |
| |
AsyncDQueue<pegasus_acceptor> pegasus_acceptor::acceptors(true, 0); | AsyncDQueue<pegasus_acceptor> pegasus_acceptor::acceptors(true, 0); |