version 1.83, 2004/12/23 15:53:49
|
version 1.84, 2005/01/24 11:15:41
|
|
|
// 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 | // Alagaraja Ramasubramanian (alags_raj@in.ibm.com) for Bug#1090 |
// Sushma Fernandes (sushma@hp.com) for Bug#2057 | // Sushma Fernandes (sushma@hp.com) for Bug#2057 |
|
// Josephine Eskaline Joyce (jojustin@in.ibm.com) for PEP#101 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include <Pegasus/Common/MessageQueueService.h> | #include <Pegasus/Common/MessageQueueService.h> |
#include <Pegasus/Common/Exception.h> | #include <Pegasus/Common/Exception.h> |
| |
|
|
#ifdef PEGASUS_OS_TYPE_WINDOWS | #ifdef PEGASUS_OS_TYPE_WINDOWS |
# if defined(FD_SETSIZE) && FD_SETSIZE != 1024 | # if defined(FD_SETSIZE) && FD_SETSIZE != 1024 |
# error "FD_SETSIZE was not set to 1024 prior to the last inclusion \ | # error "FD_SETSIZE was not set to 1024 prior to the last inclusion \ |
|
|
Tracer::trace(TRC_HTTP, Tracer::LEVEL4, | Tracer::trace(TRC_HTTP, Tracer::LEVEL4, |
"deregistering with module controller"); | "deregistering with module controller"); |
| |
if(_module_handle != NULL) |
if(_module_handle.get() != NULL) |
{ | { |
_controller->deregister_module(PEGASUS_MODULENAME_MONITOR); | _controller->deregister_module(PEGASUS_MODULENAME_MONITOR); |
_controller = 0; |
_controller.reset(); |
delete _module_handle; |
_module_handle.reset(); |
} | } |
Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "deleting rep"); | Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "deleting rep"); |
| |
|
|
| |
fd2=(Sint32) ps; | fd2=(Sint32) ps; |
| |
monitor_2_entry* m2e = new monitor_2_entry(ps, type, accept_parm, dispatch_parm); |
AutoPtr<monitor_2_entry> m2e(new monitor_2_entry(ps, type, accept_parm, dispatch_parm)); |
| |
// The purpose of the following piece of code is to avoid duplicate entries in | // The purpose of the following piece of code is to avoid duplicate entries in |
// the _listeners list. Would it be too much of an overhead ? | // the _listeners list. Would it be too much of an overhead ? |
|
|
"monitor_2::add_entry:CLOSED state changed to IDLE for %d.", fd1); | "monitor_2::add_entry:CLOSED state changed to IDLE for %d.", fd1); |
} | } |
_listeners.unlock(); | _listeners.unlock(); |
delete m2e; |
m2e.reset(); |
return 0; | return 0; |
} | } |
temp = _listeners.next(temp); | temp = _listeners.next(temp); |
|
|
} | } |
catch(...) | catch(...) |
{ | { |
delete m2e; |
m2e.reset(); |
return 0; | return 0; |
} | } |
| |
|
|
| |
| |
try{ | try{ |
_listeners.insert_first(m2e); |
_listeners.insert_first(m2e.get()); |
} | } |
catch(...){ | catch(...){ |
delete m2e; |
m2e.reset(); |
return 0; | return 0; |
} | } |
Tracer::trace(TRC_HTTP, Tracer::LEVEL4, | Tracer::trace(TRC_HTTP, Tracer::LEVEL4, |
"monitor_2::add_entry:SUCCESSFULLY added to _listeners list. FD = %d.", fd2); | "monitor_2::add_entry:SUCCESSFULLY added to _listeners list. FD = %d.", fd2); |
tickle(); | tickle(); |
return m2e; |
return m2e.release(); |
} | } |
| |
Boolean monitor_2::remove_entry(Sint32 s) | Boolean monitor_2::remove_entry(Sint32 s) |