version 1.87.2.2, 2006/07/28 23:52:20
|
version 1.88, 2006/08/04 19:05:59
|
|
|
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#include <Pegasus/Common/AutoPtr.h> | #include <Pegasus/Common/AutoPtr.h> |
|
#include <Pegasus/Common/Constants.h> |
| |
#include <Pegasus/Config/ConfigManager.h> | #include <Pegasus/Config/ConfigManager.h> |
| |
|
|
(void *)this, ProviderManagerService::handleCimOperation)) != PEGASUS_THREAD_OK) | (void *)this, ProviderManagerService::handleCimOperation)) != PEGASUS_THREAD_OK) |
{ | { |
if (rtn==PEGASUS_THREAD_INSUFFICIENT_RESOURCES) | if (rtn==PEGASUS_THREAD_INSUFFICIENT_RESOURCES) |
Threads::yield(); |
pegasus_yield(); |
else | else |
{ | { |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, | Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
|
|
| |
// Note: This method should not throw an exception. It is used as a thread | // Note: This method should not throw an exception. It is used as a thread |
// entry point, and any exceptions thrown are ignored. | // entry point, and any exceptions thrown are ignored. |
ThreadReturnType PEGASUS_THREAD_CDECL |
PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL |
ProviderManagerService::handleCimOperation(void* arg) | ProviderManagerService::handleCimOperation(void* arg) |
{ | { |
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, | PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
|
|
"op node in queue"); | "op node in queue"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(ThreadReturnType(1)); |
return(PEGASUS_THREAD_RETURN(1)); |
} | } |
| |
AsyncOpNode* op = service->_incomingQueue.remove_front(); | AsyncOpNode* op = service->_incomingQueue.remove_front(); |
|
|
{ | { |
// reply with NAK | // reply with NAK |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(ThreadReturnType(0)); |
return(PEGASUS_THREAD_RETURN(0)); |
} | } |
| |
Message* legacy = | Message* legacy = |
|
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
return(ThreadReturnType(0)); |
return(PEGASUS_THREAD_RETURN(0)); |
} | } |
| |
void ProviderManagerService::handleCimRequest( | void ProviderManagerService::handleCimRequest( |
|
|
ProviderIdContainer pidc = | ProviderIdContainer pidc = |
request->operationContext.get(ProviderIdContainer::NAME); | request->operationContext.get(ProviderIdContainer::NAME); |
providerModule = pidc.getModule(); | providerModule = pidc.getModule(); |
|
#ifdef PEGASUS_ZOS_SECURITY |
|
if (request->getType() != CIM_EXPORT_INDICATION_REQUEST_MESSAGE) |
|
{ |
|
// this is a z/OS only function |
|
// the function checks user authorization |
|
// based on CIM operation versus provider profile |
|
// Input: request and Provider ID Container |
|
//Return: failure: a response message for the client |
|
// success: NULL |
|
response = checkSAFProviderProfile(request, pidc); |
|
if (response != NULL) |
|
{ |
|
return response; |
|
} |
|
} |
|
#endif |
} | } |
| |
Uint16 userContext = PEGASUS_DEFAULT_PROV_USERCTXT; | Uint16 userContext = PEGASUS_DEFAULT_PROV_USERCTXT; |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |
ThreadReturnType PEGASUS_THREAD_CDECL |
PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL |
ProviderManagerService::_unloadIdleProvidersHandler(void* arg) throw() | ProviderManagerService::_unloadIdleProvidersHandler(void* arg) throw() |
{ | { |
try | try |
|
|
"Unexpected exception in _unloadIdleProvidersHandler"); | "Unexpected exception in _unloadIdleProvidersHandler"); |
} | } |
| |
return(ThreadReturnType(0)); |
return(PEGASUS_THREAD_RETURN(0)); |
} | } |
| |
// Updates the providerModule instance and the ProviderRegistrationManager | // Updates the providerModule instance and the ProviderRegistrationManager |
|
|
| |
while (((MessageQueueService *)indicationsQueue)->getIncomingCount() > INDICATIONS_Q_RESUME_THRESHOLD) | while (((MessageQueueService *)indicationsQueue)->getIncomingCount() > INDICATIONS_Q_RESUME_THRESHOLD) |
{ | { |
Threads::sleep(INDICATIONS_Q_STALL_DURATION); |
pegasus_sleep(INDICATIONS_Q_STALL_DURATION); |
} | } |
| |
AutoMutex indicationThresholdReportedAutoMutex1(indicationThresholdReportedLock); | AutoMutex indicationThresholdReportedAutoMutex1(indicationThresholdReportedLock); |
// indicationThresholdReportedLock.lock(); |
// indicationThresholdReportedLock.lock(pegasus_thread_self()); |
if(indicationThresholdReported) | if(indicationThresholdReported) |
{ | { |
indicationThresholdReported = false; | indicationThresholdReported = false; |