version 1.74, 2004/08/16 13:59:43
|
version 1.75, 2004/08/23 10:57:47
|
|
|
// | // |
// Modified By: Mike Day (monitor_2) mdday@us.ibm.com | // Modified By: Mike Day (monitor_2) mdday@us.ibm.com |
// Amit K Arora (Bug#1153) amita@in.ibm.com | // Amit K Arora (Bug#1153) amita@in.ibm.com |
|
// Alagaraja Ramasubramanian (alags_raj@in.ibm.com) for Bug#1090 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
int type) | int type) |
{ | { |
PEG_METHOD_ENTER(TRC_HTTP, "Monitor::solicitSocketMessages"); | PEG_METHOD_ENTER(TRC_HTTP, "Monitor::solicitSocketMessages"); |
_entry_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_entry_mut); |
// Check to see if we need to dynamically grow the _entries array | // Check to see if we need to dynamically grow the _entries array |
// We always want the _entries array to 2 bigger than the | // We always want the _entries array to 2 bigger than the |
// current connections requested | // current connections requested |
|
|
_entries[index].queueId = queueId; | _entries[index].queueId = queueId; |
_entries[index]._type = type; | _entries[index]._type = type; |
_entries[index]._status = _MonitorEntry::IDLE; | _entries[index]._status = _MonitorEntry::IDLE; |
_entry_mut.unlock(); |
|
| |
return index; | return index; |
} | } |
|
|
} | } |
} | } |
_solicitSocketCount--; // decrease the count, if we are here we didnt do anything meaningful | _solicitSocketCount--; // decrease the count, if we are here we didnt do anything meaningful |
_entry_mut.unlock(); |
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return -1; | return -1; |
| |
|
|
{ | { |
| |
PEG_METHOD_ENTER(TRC_HTTP, "Monitor::unsolicitSocketMessages"); | PEG_METHOD_ENTER(TRC_HTTP, "Monitor::unsolicitSocketMessages"); |
_entry_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_entry_mut); |
| |
/* | /* |
Start at index = 1 because _entries[0] is the tickle entry which never needs | Start at index = 1 because _entries[0] is the tickle entry which never needs |
|
|
index--; | index--; |
} | } |
| |
_entry_mut.unlock(); |
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |
|
|
| |
PEG_METHOD_ENTER(TRC_HTTP, "monitor_2::solicitSocketMessages"); | PEG_METHOD_ENTER(TRC_HTTP, "monitor_2::solicitSocketMessages"); |
| |
_entry_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_entry_mut); |
| |
for(int index = 0; index < (int)_entries.size(); index++) | for(int index = 0; index < (int)_entries.size(); index++) |
{ | { |
|
|
//_entries[index].queueId = queueId; | //_entries[index].queueId = queueId; |
//_entries[index]._type = type; | //_entries[index]._type = type; |
_entries[index]._status = IDLE; | _entries[index]._status = IDLE; |
_entry_mut.unlock(); |
|
| |
return index; | return index; |
} | } |
|
|
} | } |
| |
} | } |
_entry_mut.unlock(); |
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return -1; | return -1; |
} | } |
|
|
{ | { |
| |
PEG_METHOD_ENTER(TRC_HTTP, "monitor_2::unsolicitSocketMessages"); | PEG_METHOD_ENTER(TRC_HTTP, "monitor_2::unsolicitSocketMessages"); |
_entry2_mut.lock(pegasus_thread_self()); |
AutoMutex autoMut(_entry2_mut); |
| |
for(int index = 0; index < (int)_entries2.size(); index++) | for(int index = 0; index < (int)_entries2.size(); index++) |
{ | { |
|
|
break; | break; |
} | } |
} | } |
_entry2_mut.unlock(); |
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |