(file) Return to IndicationService.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / IndicationService

Diff for /pegasus/src/Pegasus/IndicationService/IndicationService.cpp between version 1.72 and 1.73

version 1.72, 2003/04/03 20:54:39 version 1.73, 2003/06/25 15:41:08
Line 39 
Line 39 
 #include <Pegasus/Common/CIMProperty.h> #include <Pegasus/Common/CIMProperty.h>
 #include <Pegasus/Common/HashTable.h> #include <Pegasus/Common/HashTable.h>
 #include <Pegasus/Common/MessageQueue.h> #include <Pegasus/Common/MessageQueue.h>
   #ifdef PEGASUS_INDICATION_PERFINST
   #include <Pegasus/Common/Stopwatch.h>
   #endif
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/Tracer.h> #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/XmlWriter.h> #include <Pegasus/Common/XmlWriter.h>
Line 103 
Line 106 
     {     {
         req->op->processing();         req->op->processing();
         handle_CimServiceStop(static_cast<CimServiceStop *>(req));         handle_CimServiceStop(static_cast<CimServiceStop *>(req));
   
         //         //
         //  Call _terminate         //  Call _terminate
         //         //
         _terminate ();         _terminate ();
   
   
     }     }
     else if (req->getType () == async_messages::CIMSERVICE_START)     else if (req->getType () == async_messages::CIMSERVICE_START)
     {     {
Line 120 
Line 122 
     {     {
        try        try
        {        {
   
           req->op->processing();           req->op->processing();
           Message *legacy =           Message *legacy =
              (static_cast<AsyncLegacyOperationStart *>(req)->get_action());              (static_cast<AsyncLegacyOperationStart *>(req)->get_action());
Line 143 
Line 144 
  
 void IndicationService::handleEnqueue(Message* message) void IndicationService::handleEnqueue(Message* message)
 { {
   #ifdef PEGASUS_INDICATION_PERFINST
       Stopwatch stopWatch;
   #endif
  
    switch(message->getType())    switch(message->getType())
    {    {
Line 274 
Line 276 
          break;          break;
    }    }
  
   #ifdef PEGASUS_INDICATION_PERFINST
       double elapsed = stopWatch.getElapsed ();
   
       Tracer::trace (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL2,
           "%s: %.3f seconds", MessageTypeToString (message->getType ()), elapsed);
   #endif
   
    delete message;    delete message;
 } }
  
Line 287 
Line 296 
  
 void IndicationService::_initialize (void) void IndicationService::_initialize (void)
 { {
   #ifdef PEGASUS_INDICATION_PERFINST
       Stopwatch stopWatch;
   #endif
   
     Array <CIMInstance> activeSubscriptions;     Array <CIMInstance> activeSubscriptions;
     Array <CIMInstance> noProviderSubscriptions;     Array <CIMInstance> noProviderSubscriptions;
     Array <ProviderClassList> enableProviders;     Array <ProviderClassList> enableProviders;
Line 340 
Line 353 
     //     //
     //  Get existing active subscriptions from each namespace in the repository     //  Get existing active subscriptions from each namespace in the repository
     //     //
     activeSubscriptions = _getActiveSubscriptions ();      activeSubscriptions = _getActiveSubscriptionsFromRepository ();
     noProviderSubscriptions.clear ();     noProviderSubscriptions.clear ();
  
     String condition;     String condition;
Line 362 
Line 375 
         }         }
  
         CIMNamespaceName sourceNameSpace;         CIMNamespaceName sourceNameSpace;
           Array <CIMName> indicationSubclasses;
         _getCreateParams         _getCreateParams
             (activeSubscriptions [i].getPath ().getNameSpace (),             (activeSubscriptions [i].getPath ().getNameSpace (),
             activeSubscriptions [i], indicationProviders,              activeSubscriptions [i], indicationSubclasses, indicationProviders,
             propertyList, sourceNameSpace, condition, queryLanguage);             propertyList, sourceNameSpace, condition, queryLanguage);
  
         if (indicationProviders.size () == 0)         if (indicationProviders.size () == 0)
Line 429 
Line 443 
                 enableProviders.append (indicationProviders [j]);                 enableProviders.append (indicationProviders [j]);
             }             }
         }         }
   
           //
           //  NOTE: Once bugzilla #63 is fixed, the list of providers passed to
           //  this function must be not those attempted to enable, but those who
           //  were successfully enabled (response received)
           //
           _insertToHashTables (activeSubscriptions [i], enableProviders,
               indicationSubclasses, sourceNameSpace);
     }  // for each active subscription     }  // for each active subscription
  
     //     //
Line 444 
Line 466 
         CIMInstance indicationInstance = _createAlertInstance         CIMInstance indicationInstance = _createAlertInstance
             (_CLASS_NO_PROVIDER_ALERT, noProviderSubscriptions);             (_CLASS_NO_PROVIDER_ALERT, noProviderSubscriptions);
  
           Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
               "Sending NoProvider Alert for %d subscriptions",
               noProviderSubscriptions.size ());
         _sendAlerts (noProviderSubscriptions, indicationInstance);         _sendAlerts (noProviderSubscriptions, indicationInstance);
     }     }
  
Line 458 
Line 483 
         _sendEnable (enableProviders [m]);         _sendEnable (enableProviders [m]);
     }     }
  
   #ifdef PEGASUS_INDICATION_PERFINST
       double elapsed = stopWatch.getElapsed ();
   
       Tracer::trace (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL2,
           "%s: %.3f seconds", "Initialize", elapsed);
   #endif
   
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
  
Line 469 
Line 501 
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, "IndicationService::_terminate");     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE, "IndicationService::_terminate");
  
     //     //
     //  Get existing active subscriptions from each namespace in the repository      //  Get existing active subscriptions from hash table
     //     //
     activeSubscriptions = _getActiveSubscriptions ();     activeSubscriptions = _getActiveSubscriptions ();
  
       if (activeSubscriptions.size () > 0)
       {
     //     //
     //  Create CimomShutdownAlertIndication instance     //  Create CimomShutdownAlertIndication instance
     //  ATTN: CimomShutdownAlertIndication must be defined     //  ATTN: CimomShutdownAlertIndication must be defined
Line 483 
Line 517 
     //     //
     //  Send CimomShutdownAlertIndication to each unique handler instance     //  Send CimomShutdownAlertIndication to each unique handler instance
     //     //
           Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
               "Sending CIMServerShutdown Alert for %d subscriptions",
               activeSubscriptions.size ());
     _sendAlerts (activeSubscriptions, indicationInstance);     _sendAlerts (activeSubscriptions, indicationInstance);
       }
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
Line 536 
Line 574 
             String queryLanguage;             String queryLanguage;
             CIMPropertyList requiredProperties;             CIMPropertyList requiredProperties;
             CIMNamespaceName sourceNameSpace;             CIMNamespaceName sourceNameSpace;
               Array <CIMName> indicationSubclasses;
             Array <ProviderClassList> indicationProviders;             Array <ProviderClassList> indicationProviders;
   
             if (instance.getClassName ().equal             if (instance.getClassName ().equal
                 (PEGASUS_CLASSNAME_INDSUBSCRIPTION))                 (PEGASUS_CLASSNAME_INDSUBSCRIPTION))
             {             {
Line 551 
Line 591 
                 if ((subscriptionState == _STATE_ENABLED) ||                 if ((subscriptionState == _STATE_ENABLED) ||
                     (subscriptionState == _STATE_ENABLEDDEGRADED))                     (subscriptionState == _STATE_ENABLEDDEGRADED))
                 {                 {
   
                     _getCreateParams (request->nameSpace, instance,                     _getCreateParams (request->nameSpace, instance,
                         indicationProviders, requiredProperties,                          indicationSubclasses, indicationProviders,
                         sourceNameSpace, condition, queryLanguage);                          requiredProperties, sourceNameSpace, condition,
                           queryLanguage);
  
                     if (indicationProviders.size () == 0)                     if (indicationProviders.size () == 0)
                     {                     {
Line 711 
Line 751 
                         //                         //
                         _sendEnable (indicationProviders [i]);                         _sendEnable (indicationProviders [i]);
                     }                     }
   
                       //
                       //  NOTE: Once bugzilla #63 is fixed, the list of providers
                       //  passed to this function must be not those attempted to
                       //  enable, but those who were successfully enabled
                       //  (response received)
                       //
                       _insertToHashTables (instance, indicationProviders,
                           indicationSubclasses, sourceNameSpace);
                 }                 }
             }             }
         }         }
Line 1152 
Line 1201 
                 CIMNamespaceName sourceNameSpace;                 CIMNamespaceName sourceNameSpace;
                 String condition;                 String condition;
                 String queryLanguage;                 String queryLanguage;
                   Array <CIMName> indicationSubclasses;
  
                 if (((newState == _STATE_ENABLED) ||                 if (((newState == _STATE_ENABLED) ||
                      (newState == _STATE_ENABLEDDEGRADED))                      (newState == _STATE_ENABLEDDEGRADED))
Line 1163 
Line 1213 
                     //  be enabled                     //  be enabled
                     //                     //
                     _getCreateParams (request->nameSpace, instance,                     _getCreateParams (request->nameSpace, instance,
                         indicationProviders, requiredProperties,                          indicationSubclasses, indicationProviders,
                         sourceNameSpace, condition, queryLanguage);                          requiredProperties, sourceNameSpace, condition,
                           queryLanguage);
  
                     if (indicationProviders.size () == 0)                     if (indicationProviders.size () == 0)
                     {                     {
Line 1270 
Line 1321 
                         //                         //
                         _sendEnable (indicationProviders [i]);                         _sendEnable (indicationProviders [i]);
                     }                     }
   
                       //
                       //  Insert entries into the subscription hash tables
                       //
                       //
                       //  NOTE: Once bugzilla #63 is fixed, the list of providers
                       //  passed to this function must be not those attempted to
                       //  enable, but those who were successfully enabled
                       //  (response received)
                       //
                       _insertToHashTables (instance, indicationProviders,
                           indicationSubclasses, sourceNameSpace);
                 }                 }
                 else if ((newState == _STATE_DISABLED) &&                 else if ((newState == _STATE_DISABLED) &&
                          ((currentState == _STATE_ENABLED) ||                          ((currentState == _STATE_ENABLED) ||
Line 1280 
Line 1343 
                     //  disabled                     //  disabled
                     //                     //
                     Array <ProviderClassList> indicationProviders;                     Array <ProviderClassList> indicationProviders;
                     indicationProviders = _getDeleteParams                      indicationProviders = _getDeleteParams (request->nameSpace,
                         (request->nameSpace, instance);                          instance, indicationSubclasses, sourceNameSpace);
  
                     //                     //
                     //  Send Delete requests                     //  Send Delete requests
                     //                     //
                     if (indicationProviders.size () > 0)  
                     {  
                         instanceReference.setNameSpace (request->nameSpace);                         instanceReference.setNameSpace (request->nameSpace);
                         instance.setPath (instanceReference);                         instance.setPath (instanceReference);
                       if (indicationProviders.size () > 0)
                       {
                         _sendDeleteRequests (indicationProviders,                         _sendDeleteRequests (indicationProviders,
                             request->nameSpace,                             request->nameSpace,
                             instance,                             instance,
                             request->userName, request->authType);                             request->userName, request->authType);
                     }                     }
   
                       //
                       //  Remove entries from the subscription hash tables
                       //
                       _removeFromHashTables (instance, indicationSubclasses,
                           sourceNameSpace);
                 }                 }
             }             }
         }         }
Line 1380 
Line 1449 
  
                 _repository->read_unlock ();                 _repository->read_unlock ();
  
                   Array <CIMName> indicationSubclasses;
                   CIMNamespaceName sourceNamespaceName;
                 indicationProviders = _getDeleteParams                 indicationProviders = _getDeleteParams
                     (request->nameSpace, subscriptionInstance);                      (request->nameSpace, subscriptionInstance,
                       indicationSubclasses, sourceNamespaceName);
  
                 //                 //
                 //  Send Delete requests                 //  Send Delete requests
Line 1392 
Line 1464 
                 _sendDeleteRequests (indicationProviders,                 _sendDeleteRequests (indicationProviders,
                     request->nameSpace, subscriptionInstance,                     request->nameSpace, subscriptionInstance,
                     request->userName, request->authType);                     request->userName, request->authType);
   
                   //
                   //  Remove entries from subscription hash tables
                   //
                   _removeFromHashTables (subscriptionInstance,
                       indicationSubclasses, sourceNamespaceName);
             }             }
  
             //             //
Line 1493 
Line 1571 
  
 void IndicationService::_handleProcessIndicationRequest (const Message* message) void IndicationService::_handleProcessIndicationRequest (const Message* message)
 { {
   #ifdef PEGASUS_INDICATION_PERFINST
       Stopwatch stopWatch;
       double elapsed;
   #endif
   
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_handleProcessIndicationRequest");                       "IndicationService::_handleProcessIndicationRequest");
  
Line 1517 
Line 1600 
  
     CIMInstance handler;     CIMInstance handler;
     CIMInstance indication = request->indicationInstance;     CIMInstance indication = request->indicationInstance;
   
     PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL4,     PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL4,
                      "Received Indication " +          "Received Indication " + indication.getClassName().getString());
                      indication.getClassName().getString());  
     try     try
     {     {
         WQLSimplePropertySource propertySource = _getPropertySourceFromInstance(          WQLSimplePropertySource propertySource =
             indication);              _getPropertySourceFromInstance (indication);
  
         //         //
         //  Check if property list contains all properties of class         //  Check if property list contains all properties of class
Line 1541 
Line 1625 
  
         if (request->subscriptionInstanceNames.size() > 0)         if (request->subscriptionInstanceNames.size() > 0)
         {         {
   #ifdef PEGASUS_INDICATION_PERFINST
               stopWatch.reset ();
   #endif
   
             for (Uint8 i = 0; i < request->subscriptionInstanceNames.size();             for (Uint8 i = 0; i < request->subscriptionInstanceNames.size();
                  i++)                  i++)
             {             {
                 CIMInstance instance = _repository->getInstance                  //
                     (request->nameSpace, request->subscriptionInstanceNames[i]);                  //  Look up the subscription in the active subscriptions table
                 matchedSubscriptions.append (instance);                  //
                   String activeSubscriptionsKey = _generateActiveSubscriptionsKey
                       (request->subscriptionInstanceNames [i]);
                   ActiveSubscriptionsTableEntry tableValue;
                   if (_activeSubscriptionsTable.lookup (activeSubscriptionsKey,
                       tableValue))
                   {
                       matchedSubscriptions.append (tableValue.subscription);
                   }
             }             }
   
   #ifdef PEGASUS_INDICATION_PERFINST
               elapsed = stopWatch.getElapsed ();
   
               Tracer::trace (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL2,
                   "%s: %.3f seconds",
                   "Look up Subscriptions", elapsed);
   #endif
         }         }
         else         else
         {         {
   #ifdef PEGASUS_INDICATION_PERFINST
               stopWatch.reset ();
   #endif
   
             matchedSubscriptions = _getMatchingSubscriptions(             matchedSubscriptions = _getMatchingSubscriptions(
                 indication.getClassName (), nameSpaces, propertyList);                 indication.getClassName (), nameSpaces, propertyList);
   
   #ifdef PEGASUS_INDICATION_PERFINST
               elapsed = stopWatch.getElapsed ();
   
               Tracer::trace (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL2,
                   "%s: %.3f seconds",
                   "Get Matching Subscriptions", elapsed);
   #endif
         }         }
  
         for (Uint8 i = 0; i < matchedSubscriptions.size(); i++)         for (Uint8 i = 0; i < matchedSubscriptions.size(); i++)
Line 1585 
Line 1701 
  
             if (selectStatement.hasWhereClause())             if (selectStatement.hasWhereClause())
             {             {
   #ifdef PEGASUS_INDICATION_PERFINST
                   stopWatch.reset ();
   #endif
   
                 if (!selectStatement.evaluateWhereClause(&propertySource))                 if (!selectStatement.evaluateWhereClause(&propertySource))
                 {                 {
                     match = false;                     match = false;
                 }                 }
   
   #ifdef PEGASUS_INDICATION_PERFINST
                   elapsed = stopWatch.getElapsed ();
   
                   Tracer::trace (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL2,
                       "%s: %.3f seconds",
                       "Evaluate WHERE clause", elapsed);
   #endif
             }             }
  
             if (match)             if (match)
Line 1651 
Line 1779 
                     _queueId);                     _queueId);
  
                 PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL4,                 PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL4,
                     "Sending (SendForget) Indication to " +                      "Sending (SendWait) Indication to " +
                     ((MessageQueue::lookup(_handlerService)) ?                     ((MessageQueue::lookup(_handlerService)) ?
                     String(((MessageQueue::lookup                     String(((MessageQueue::lookup
                     (_handlerService))->getQueueName())) :                     (_handlerService))->getQueueName())) :
Line 1715 
Line 1843 
     CIMPropertyList newPropertyNames = request->newPropertyNames;     CIMPropertyList newPropertyNames = request->newPropertyNames;
     CIMPropertyList oldPropertyNames = request->oldPropertyNames;     CIMPropertyList oldPropertyNames = request->oldPropertyNames;
  
   
     Array <CIMInstance> newSubscriptions;     Array <CIMInstance> newSubscriptions;
     Array <CIMInstance> formerSubscriptions;     Array <CIMInstance> formerSubscriptions;
     Array <ProviderClassList> indicationProviders;     Array <ProviderClassList> indicationProviders;
Line 1776 
Line 1903 
     indicationProvider.classList.append (className);     indicationProvider.classList.append (className);
     indicationProviders.append (indicationProvider);     indicationProviders.append (indicationProvider);
  
 //cout << "newSubscriptions.size (): " << newSubscriptions.size () << endl;  
     if (newSubscriptions.size () > 0)     if (newSubscriptions.size () > 0)
     {     {
         CIMPropertyList requiredProperties;         CIMPropertyList requiredProperties;
Line 1790 
Line 1916 
         for (Uint8 i = 0; i < newSubscriptions.size (); i++)         for (Uint8 i = 0; i < newSubscriptions.size (); i++)
         {         {
             CIMNamespaceName sourceNameSpace;             CIMNamespaceName sourceNameSpace;
               Array <CIMName> indicationSubclasses;
             _getCreateParams             _getCreateParams
                 (newSubscriptions [i].getPath ().getNameSpace (),                 (newSubscriptions [i].getPath ().getNameSpace (),
                 newSubscriptions [i],                  newSubscriptions [i], indicationSubclasses,
                 requiredProperties, sourceNameSpace, condition, queryLanguage);                 requiredProperties, sourceNameSpace, condition, queryLanguage);
  
             //             //
Line 1806 
Line 1933 
                 (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString ();                 (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString ();
  
             //             //
             //  Look up the subscription-provider pair in the subscription table              //  Look up the subscription in the active subscriptions table
             //  If the entry is there, send a Modify request,  
             //  Otherwise, send a Create request  
             //             //
             String tableKey = _generateKey              String activeSubscriptionsKey = _generateActiveSubscriptionsKey
                 (newSubscriptions [i], indicationProviders [i].provider);                  (newSubscriptions [i].getPath ());
             if (_subscriptionTable.contains (tableKey))              ActiveSubscriptionsTableEntry tableValue;
               if (_activeSubscriptionsTable.lookup (activeSubscriptionsKey,
                   tableValue))
             {             {
                   Boolean update = false;
                   ProviderClassList providerClasses;
   
                 //                 //
                 //  ATTN-CAKG-P3-20030226: Add test case                  //  If the provider is already in the subscription's list,
                   //  send a Modify request, otherwise send a Create request
                 //                 //
 //cout << "case A: table contains key" << endl;                  Uint32 providerIndex = _providerInList (provider, tableValue);
                   if (providerIndex != PEG_NOT_FOUND)
                   {
                 //                 //
                 //  Send Modify requests                 //  Send Modify requests
                 //                 //
Line 1825 
Line 1958 
                     newSubscriptions [i].getPath ().getNameSpace (),                     newSubscriptions [i].getPath ().getNameSpace (),
                     requiredProperties, condition, queryLanguage,                     requiredProperties, condition, queryLanguage,
                     newSubscriptions [i], creator);                     newSubscriptions [i], creator);
   
                       Uint32 classIndex = _classInList (className,
                           tableValue.providers [providerIndex]);
                       if (classIndex == PEG_NOT_FOUND)
                       {
                           //
                           //  Provider is already serving this subscription, but
                           //  not for this class
                           //
                           update = true;
                           tableValue.providers [providerIndex].classList.append
                               (className);
                       }
             }             }
             else             else
             {             {
 //cout << "case B: table does not contain key" << endl;                      //
                       //  Provider was not previously serving this subscription
                       //
                       update = true;
                       tableValue.providers.append (indicationProvider);
   
                 //                 //
                 //  Send Create requests                 //  Send Create requests
                 //                 //
Line 1852 
Line 2003 
                     _sendEnable (indicationProviders [j]);                     _sendEnable (indicationProviders [j]);
                 }                 }
             }             }
   
                   //
                   //  NOTE: Once bugzilla #63 is fixed, the update must only
                   //  be done if the provider responds successfully to the
                   //  enable request
                   //
                   if (update)
                   {
                       _activeSubscriptionsTable.remove (activeSubscriptionsKey);
   #ifdef PEGASUS_INDICATION_HASHTRACE
                       PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL,
                           Tracer::LEVEL3,
                           "REMOVED _activeSubscriptionsTable entry: " +
                           activeSubscriptionsKey);
   #endif
                       _insertActiveSubscriptionsEntry (tableValue.subscription,
                           tableValue.providers);
                   }
               }  // subscription found in table
               else
               {
                   //
                   //  Subscription not found in Active Subscriptions table
                   //
   
                   //
                   //  ATTN-CAKG-P3-20030403: Log a message
                   //
               }
         }         }
     }     }
  
 //cout << "formerSubscriptions.size (): " << formerSubscriptions.size () << endl;  
     if (formerSubscriptions.size () > 0)     if (formerSubscriptions.size () > 0)
     {     {
         CIMPropertyList requiredProperties;         CIMPropertyList requiredProperties;
Line 1877 
Line 2056 
                 (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString ();                 (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString ();
  
             //             //
             //  Look up the subscription-provider pair in the subscription table              //  Look up the subscription in the active subscriptions table
             //  If class list contains only the class name from the current             //  If class list contains only the class name from the current
             //  operation, send a Delete request             //  operation, send a Delete request
             //  Otherwise, send a Modify request             //  Otherwise, send a Modify request
             //             //
             String tableKey = _generateKey              String activeSubscriptionsKey = _generateActiveSubscriptionsKey
                 (formerSubscriptions [i], indicationProviders [i].provider);                  (formerSubscriptions [i].getPath ());
             SubscriptionTableEntry tableValue;              ActiveSubscriptionsTableEntry tableValue;
             if (_subscriptionTable.lookup (tableKey, tableValue))              if (_activeSubscriptionsTable.lookup (activeSubscriptionsKey,
             {                  tableValue))
 //cout << "table contains key" << endl;              {
                 //                  Uint32 providerIndex = _providerInList (provider, tableValue);
                 //  If class list contains only the class name from the current                  if (providerIndex != PEG_NOT_FOUND)
                 //  delete, send a Delete request                  {
                 //                      //
                 if ((tableValue.classList.size () == 1) &&                      //  If class list contains only the class name from the
                     (tableValue.classList [0].equal (className)))                      //  current delete, send a Delete request
                       //
                       if ((tableValue.providers [providerIndex].classList.size ()
                               == 1) &&
                           (tableValue.providers [providerIndex].classList
                               [0].equal (className)))
                 {                 {
 //cout << "case C: classlist contains only this class" << endl;  
                     _sendDeleteRequests (indicationProviders,                     _sendDeleteRequests (indicationProviders,
                         formerSubscriptions [i].getPath ().getNameSpace (),                         formerSubscriptions [i].getPath ().getNameSpace (),
                         formerSubscriptions [i], creator);                         formerSubscriptions [i], creator);
   
                           tableValue.providers.remove (providerIndex);
                 }                 }
  
                 //                 //
Line 1906 
Line 2091 
                 //                 //
                 else                 else
                 {                 {
                     //                          Uint32 classIndex = _classInList (className,
                     //  ATTN-CAKG-P3-20030226: Add test case                              tableValue.providers [providerIndex]);
                     //                          if (classIndex != PEG_NOT_FOUND)
 //cout << "case D: classlist contains more" << endl;                          {
                     CIMNamespaceName sourceNameSpace;                     CIMNamespaceName sourceNameSpace;
                           Array <CIMName> indicationSubclasses;
                     _getCreateParams                     _getCreateParams
                         (formerSubscriptions [i].getPath ().getNameSpace (),                         (formerSubscriptions [i].getPath ().getNameSpace (),
                         formerSubscriptions [i],                              formerSubscriptions [i], indicationSubclasses,
                         requiredProperties, sourceNameSpace, condition,                         requiredProperties, sourceNameSpace, condition,
                         queryLanguage);                         queryLanguage);
  
Line 1924 
Line 2110 
                         formerSubscriptions [i].getPath ().getNameSpace (),                         formerSubscriptions [i].getPath ().getNameSpace (),
                         requiredProperties, condition, queryLanguage,                         requiredProperties, condition, queryLanguage,
                         formerSubscriptions [i], creator);                         formerSubscriptions [i], creator);
   
                           tableValue.providers [providerIndex].classList.remove
                               (classIndex);
                           }
                           else
                           {
                               //
                               //  ATTN-CAKG-P3-20030403: Log a message
                               //
                           }
                       }
                       _activeSubscriptionsTable.remove (activeSubscriptionsKey);
   #ifdef PEGASUS_INDICATION_HASHTRACE
                       PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL,
                           Tracer::LEVEL3,
                           "REMOVED _activeSubscriptionsTable entry: " +
                           activeSubscriptionsKey);
   #endif
                       _insertActiveSubscriptionsEntry (tableValue.subscription,
                           tableValue.providers);
                   }
                   else
                   {
                       //
                       //  The subscription was not served by the provider
                       //
                 }                 }
             }             }
             else             else
             {             {
                 //                 //
                 //  An error condition                  //  ATTN-CAKG-P3-20030403: Log a message
                 //                 //
                 //cout << "Error on delete: table does not contain key" << endl;  
             }             }
         }         }
  
Line 1952 
Line 2163 
         //         //
         //  Send NoProviderAlertIndication to each unique handler instance         //  Send NoProviderAlertIndication to each unique handler instance
         //         //
           Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
               "Sending NoProvider Alert for %d subscriptions",
               formerSubscriptions.size ());
         _sendAlerts (formerSubscriptions, indicationInstance);         _sendAlerts (formerSubscriptions, indicationInstance);
     }     }
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
  
   Uint32 IndicationService::_providerInList
       (const CIMInstance & provider,
        const ActiveSubscriptionsTableEntry & tableValue)
   {
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_providerInList");
   
       //
       //  Look for the provider in the list
       //
       for (Uint8 i = 0; i < tableValue.providers.size (); i++)
       {
           if (tableValue.providers [i].provider.identical (provider))
           {
               return i;
           }
       }
   
       return PEG_NOT_FOUND;
   
       PEG_METHOD_EXIT ();
   }
   
   Uint32 IndicationService::_classInList
       (const CIMName & className,
        const ProviderClassList & providerClasses)
   {
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_classInList");
   
       //
       //  Look for the class in the list
       //
       for (Uint8 i = 0; i < providerClasses.classList.size (); i++)
       {
           if (providerClasses.classList [i].equal (className))
           {
               return i;
           }
       }
   
       return PEG_NOT_FOUND;
   
       PEG_METHOD_EXIT ();
   }
   
 void IndicationService::_handleNotifyProviderTerminationRequest void IndicationService::_handleNotifyProviderTerminationRequest
     (const Message * message)     (const Message * message)
 { {
Line 1977 
Line 2237 
         //         //
         //  Get list of affected subscriptions         //  Get list of affected subscriptions
         //         //
           //  _getProviderSubscriptions also updates the Active Subscriptions
           //  hash table, and implements each subscription's On Fatal Error
           //  policy, if necessary
           //
         providerSubscriptions.clear ();         providerSubscriptions.clear ();
         providerSubscriptions = _getProviderSubscriptions (providers [i]);         providerSubscriptions = _getProviderSubscriptions (providers [i]);
  
         //          if (providerSubscriptions.size () > 0)
         //  ATTN-CAKG-P2-20020426: For each subscription, if the terminated          {
         //  provider was the only provider serving the subscription,  
         //  implement the subscription's On Fatal Error Policy  
         //  
   
         //         //
         //  NOTE: When a provider that was previously serving a subscription         //  NOTE: When a provider that was previously serving a subscription
         //  no longer serves the subscription due to a provider termination,         //  no longer serves the subscription due to a provider termination,
Line 2004 
Line 2264 
         //  Send ProviderTerminatedAlertIndication to each unique handler         //  Send ProviderTerminatedAlertIndication to each unique handler
         //  instance         //  instance
         //         //
               Tracer::trace (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
                   "Sending ProviderDisabled Alert for %d subscriptions",
                   providerSubscriptions.size ());
         _sendAlerts (providerSubscriptions, indicationInstance);         _sendAlerts (providerSubscriptions, indicationInstance);
     }     }
       }
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
Line 2735 
Line 2999 
 } }
  
  
 Array <CIMInstance> IndicationService::_getActiveSubscriptions () const  Array <CIMInstance>
   IndicationService::_getActiveSubscriptionsFromRepository () const
 { {
     Array <CIMInstance> activeSubscriptions;     Array <CIMInstance> activeSubscriptions;
     Array <CIMNamespaceName> nameSpaceNames;     Array <CIMNamespaceName> nameSpaceNames;
Line 2744 
Line 3009 
     Uint16 subscriptionState;     Uint16 subscriptionState;
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_getActiveSubscriptions");          "IndicationService::_getActiveSubscriptionsFromRepository");
  
     //     //
     //  Get list of namespaces in repository     //  Get list of namespaces in repository
Line 2801 
Line 3066 
     return activeSubscriptions;     return activeSubscriptions;
 } }
  
   Array <CIMInstance> IndicationService::_getActiveSubscriptions () const
   {
       Array <CIMInstance> activeSubscriptions;
   
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_getActiveSubscriptions");
   
       //
       //  Iterate through the subscription table
       //
       for (ActiveSubscriptionsTable::Iterator i =
           _activeSubscriptionsTable.start (); i; i++)
       {
           //
           //  Append subscription to the list
           //
           activeSubscriptions.append (i.value ().subscription);
       }
   
       PEG_METHOD_EXIT ();
       return activeSubscriptions;
   }
   
  
 Array <CIMInstance> IndicationService::_getMatchingSubscriptions ( Array <CIMInstance> IndicationService::_getMatchingSubscriptions (
     const CIMName & supportedClass,     const CIMName & supportedClass,
Line 2808 
Line 3096 
     const CIMPropertyList & supportedProperties)     const CIMPropertyList & supportedProperties)
 { {
     Array <CIMInstance> matchingSubscriptions;     Array <CIMInstance> matchingSubscriptions;
     Array <CIMNamespaceName> nameSpaceNames;  
     Array <CIMInstance> subscriptions;     Array <CIMInstance> subscriptions;
     CIMValue subscriptionStateValue;  
     Uint16 subscriptionState;  
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_getMatchingSubscriptions");                       "IndicationService::_getMatchingSubscriptions");
  
     //      for (Uint8 i = 0; i < nameSpaces.size (); i++)
     //  Get list of namespaces in repository  
     //  
     nameSpaceNames = _getNameSpaceNames ();  
   
     //  
     //  Get existing subscriptions from each namespace in the repository  
     //  
     for (Uint8 i = 0; i < nameSpaceNames.size (); i++)  
     {     {
   
         //  
         //  Get existing subscriptions in current namespace  
         //  
         subscriptions = _getSubscriptions (nameSpaceNames [i]);  
   
         //         //
         //  Process each subscription          //  Look up the indicationClass-sourceNamespace pair in the
           //  Subscription Classes table
         //         //
           String subscriptionClassesKey = _generateSubscriptionClassesKey
               (supportedClass, nameSpaces [i]);
           SubscriptionClassesTableEntry tableValue;
           if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
               tableValue))
           {
               subscriptions = tableValue.subscriptions;
         for (Uint8 j = 0; j < subscriptions.size (); j++)         for (Uint8 j = 0; j < subscriptions.size (); j++)
         {         {
             //                  Boolean match = true;
             //  Get subscription state  
             //  
             subscriptionStateValue =  
                 subscriptions [j].getProperty  
                 (subscriptions [j].findProperty  
                 (_PROPERTY_STATE)).getValue ();  
             subscriptionStateValue.get (subscriptionState);  
  
             //             //
             //  Process each enabled subscription                  //  If supported properties is null (all properties)
                   //  the subscription can be supported
             //             //
             if ((subscriptionState == _STATE_ENABLED) ||                  if (!supportedProperties.isNull ())
                 (subscriptionState == _STATE_ENABLEDDEGRADED))  
             {             {
                 String filterQuery;                 String filterQuery;
                 WQLSelectStatement selectStatement;                 WQLSelectStatement selectStatement;
                 CIMName indicationClassName;                 CIMName indicationClassName;
                 Array <CIMName> indicationSubclasses;  
                 CIMNamespaceName sourceNameSpace;                 CIMNamespaceName sourceNameSpace;
                 CIMPropertyList propertyList;                 CIMPropertyList propertyList;
                 Boolean match;  
  
                 //                 //
                 //  Get filter properties                 //  Get filter properties
                 //                 //
                 _getFilterProperties (subscriptions [j],                 _getFilterProperties (subscriptions [j],
                     nameSpaceNames [i], filterQuery, sourceNameSpace);                          nameSpaces [i], filterQuery, sourceNameSpace);
                 selectStatement = _getSelectStatement (filterQuery);                 selectStatement = _getSelectStatement (filterQuery);
  
                 //                 //
                 //  Get indication class name from filter query (FROM clause)                      //  Get indication class name from filter query
                 //  
                 indicationClassName = _getIndicationClassName (selectStatement,  
                     sourceNameSpace);  
   
                 //  
                 //  Get list of subclass names for indication class  
                 //  
                 indicationSubclasses = _getIndicationSubclasses  
                     (sourceNameSpace, indicationClassName);  
   
                 //  
                 //  Is current subscription for the supported class and one of  
                 //  the supported namespaces?  
                 //                 //
                 if ((Contains (indicationSubclasses, supportedClass)) &&                      indicationClassName = _getIndicationClassName
                     (Contains (nameSpaces, sourceNameSpace)))                          (selectStatement, sourceNameSpace);
                 {  
                     match = true;  
  
                     //                     //
                     //  If supported properties is null (all properties)  
                     //  the subscription can be supported  
                     //  
                     if (!supportedProperties.isNull ())  
                     {  
                         //  
                         //  Get property list from filter query (FROM and                         //  Get property list from filter query (FROM and
                         //  WHERE clauses)                         //  WHERE clauses)
                         //                         //
Line 2930 
Line 3179 
                         }                         }
                     }                     }
  
                     //  
                     //  Add current subscription to list  
                     //  
                     if (match)                     if (match)
                     {                     {
                         //                         //
                         //  CIMInstances returned from repository do not                      //  Add current subscription to list
                         //  include namespace  
                         //  Set namespace here  
                         //                         //
                         CIMObjectPath instanceName =  
                             subscriptions [j].getPath ();  
                         instanceName.setNameSpace (nameSpaceNames [i]);  
                         subscriptions [j].setPath (instanceName);  
                         matchingSubscriptions.append (subscriptions [j]);                         matchingSubscriptions.append (subscriptions [j]);
                     }                     }
                 }  // if subscription includes supported class              }
             }  // if subscription is enabled          }
         }  // for each subscription      }
     }  // for each namespace  
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
     return matchingSubscriptions;     return matchingSubscriptions;
Line 2964 
Line 3203 
     Array <CIMInstance> & newSubscriptions,     Array <CIMInstance> & newSubscriptions,
     Array <CIMInstance> & formerSubscriptions)     Array <CIMInstance> & formerSubscriptions)
 { {
     Array <CIMNamespaceName> nameSpaceNames;      Array <CIMInstance> newList;
     Array <CIMInstance> subscriptions;      Array <CIMInstance> formerList;
     CIMValue subscriptionStateValue;      Array <CIMInstance> bothList;
     Uint16 subscriptionState;  
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_getModifiedSubscriptions");                       "IndicationService::_getModifiedSubscriptions");
Line 2976 
Line 3214 
     formerSubscriptions.clear ();     formerSubscriptions.clear ();
  
     //     //
     //  Get list of namespaces in repository      //  For each newly supported namespace, lookup to retrieve list of
       //  subscriptions for the indication class-source namespace pair
     //     //
     nameSpaceNames = _getNameSpaceNames ();      for (Uint8 i = 0; i < newNameSpaces.size (); i++)
       {
     //     //
     //  Get existing subscriptions from each namespace in the repository          //  Look up the indicationClass-sourceNamespace pair in the
           //  Subscription Classes table
     //     //
     for (Uint8 i = 0; i < nameSpaceNames.size (); i++)          String subscriptionClassesKey = _generateSubscriptionClassesKey
               (supportedClass, newNameSpaces [i]);
           SubscriptionClassesTableEntry tableValue;
           if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
               tableValue))
     {     {
               for (Uint8 j = 0; j < tableValue.subscriptions.size (); j++)
                   newList.append (tableValue.subscriptions [j]);
           }
       }
  
         //         //
         //  Get existing subscriptions in current namespace      //  For each formerly supported namespace, lookup to retrieve list of
       //  subscriptions for the indication class-source namespace pair
         //         //
         subscriptions = _getSubscriptions (nameSpaceNames [i]);      for (Uint8 k = 0; k < oldNameSpaces.size (); k++)
       {
         //         //
         //  Process each subscription          //  Look up the indicationClass-sourceNamespace pair in the
           //  Subscription Classes table
         //         //
         for (Uint8 j = 0; j < subscriptions.size (); j++)          String subscriptionClassesKey = _generateSubscriptionClassesKey
               (supportedClass, oldNameSpaces [k]);
           SubscriptionClassesTableEntry tableValue;
           if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
               tableValue))
         {         {
               for (Uint8 m = 0; m < tableValue.subscriptions.size (); m++)
                   formerList.append (tableValue.subscriptions [m]);
           }
       }
   
             //             //
             //  Get subscription state      //  Find subscriptions that appear in both lists, and move them to a third
       //  list
             //             //
             subscriptionStateValue =      Sint8 found;
                 subscriptions [j].getProperty      for (Uint8 p = 0; p < newList.size (); p++)
                 (subscriptions [j].findProperty      {
                 (_PROPERTY_STATE)).getValue ();          found = -1;
             subscriptionStateValue.get (subscriptionState);          for (Uint8 q = 0; q < formerList.size (); q++)
           {
               if (newList [p].identical (formerList [q]))
               {
                   found = q;
                   bothList.append (newList [p]);
                   break;
               }
           }
           if (found >= 0)
           {
               newList.remove (p);
               p--;
               formerList.remove (found);
           }
       }
  
             //             //
             //  Process each enabled subscription      //  For indicationClassName-sourceNamespace pair that is now supported, but
       //  previously was not, add to list of newly supported subscriptions if
       //  required properties are now supported
             //             //
             if ((subscriptionState == _STATE_ENABLED) ||      for (Uint8 n = 0; n < newList.size (); n++)
                 (subscriptionState == _STATE_ENABLEDDEGRADED))  
             {             {
                 String filterQuery;                 String filterQuery;
                 WQLSelectStatement selectStatement;                 WQLSelectStatement selectStatement;
                 CIMName indicationClassName;                 CIMName indicationClassName;
                 Array <CIMName> indicationSubclasses;  
                 CIMNamespaceName sourceNameSpace;                 CIMNamespaceName sourceNameSpace;
                 CIMPropertyList requiredProperties;                 CIMPropertyList requiredProperties;
                 Boolean newMatch;  
                 Boolean formerMatch;  
  
                 //                 //
                 //  Get filter properties                 //  Get filter properties
                 //                 //
                 _getFilterProperties (subscriptions [j],          _getFilterProperties (newList [n],
                     nameSpaceNames [i], filterQuery, sourceNameSpace);              newList [n].getPath ().getNameSpace (), filterQuery,
               sourceNameSpace);
                 selectStatement = _getSelectStatement (filterQuery);                 selectStatement = _getSelectStatement (filterQuery);
  
                 //                 //
Line 3034 
Line 3308 
                     sourceNameSpace);                     sourceNameSpace);
  
                 //                 //
                 //  Get list of subclass names for indication class  
                 //  
                 indicationSubclasses = _getIndicationSubclasses  
                     (sourceNameSpace, indicationClassName);  
   
                 //  
                 //  Is current subscription for the supported class?  
                 //  
                 if (Contains (indicationSubclasses, supportedClass))  
                 {  
                     newMatch = false;  
                     formerMatch = false;  
   
                     //  
                     //  Get property list from filter query (FROM and WHERE                     //  Get property list from filter query (FROM and WHERE
                     //  clauses)                     //  clauses)
                     //                     //
Line 3055 
Line 3315 
                         sourceNameSpace, indicationClassName);                         sourceNameSpace, indicationClassName);
  
                     //                     //
                     //  If source namespace is now supported, but previously          //  Check if required properties are now supported
                     //  was not, check if required properties are now supported  
                     //                     //
                     if ((Contains (newNameSpaces, sourceNameSpace)) &&          if (_inPropertyList (requiredProperties, newProperties))
                         (!Contains (oldNameSpaces, sourceNameSpace)))  
                     {                     {
                         newMatch = _inPropertyList (requiredProperties,              newSubscriptions.append (newList [n]);
                             newProperties);          }
                     }                     }
  
                     //                     //
                     //  If source namespace was previously supported, but now      //  For indicationClassName-sourceNamespace pair that was previously
                     //  is not, check if required properties were previously      //  supported, but now is not, add to list of formerly supported
                     //  supported      //  subscriptions
                     //                     //
                     else if ((Contains (oldNameSpaces, sourceNameSpace)) &&      for (Uint8 f = 0; f < formerList.size (); f++)
                              (!Contains (newNameSpaces, sourceNameSpace)))  
                     {                     {
                         formerMatch = _inPropertyList (requiredProperties,          formerSubscriptions.append (formerList [f]);
                             oldProperties);  
                     }                     }
  
                     //                     //
                     //  If source namespace was previously supported, and still      //  For indicationClassName-sourceNamespace pair that is now supported,
                     //  is supported, check required properties      //  and was also previously supported, add to appropriate list, based on
       //  required properties
                     //                     //
                     else if ((Contains (newNameSpaces, sourceNameSpace)) &&      for (Uint8 b = 0; b < bothList.size (); b++)
                         (Contains (oldNameSpaces, sourceNameSpace)))  
                     {                     {
           String filterQuery;
           WQLSelectStatement selectStatement;
           CIMName indicationClassName;
           CIMNamespaceName sourceNameSpace;
           CIMPropertyList requiredProperties;
           Boolean newMatch = false;
           Boolean formerMatch = false;
   
           //
           //  Get filter properties
           //
           _getFilterProperties (bothList [b],
               bothList [b].getPath ().getNameSpace (), filterQuery,
               sourceNameSpace);
           selectStatement = _getSelectStatement (filterQuery);
   
           //
           //  Get indication class name from filter query (FROM clause)
           //
           indicationClassName = _getIndicationClassName (selectStatement,
               sourceNameSpace);
   
           //
           //  Get property list from filter query (FROM and WHERE
           //  clauses)
           //
           requiredProperties = _getPropertyList (selectStatement,
               sourceNameSpace, indicationClassName);
   
           //
           //  Check required properties
           //
                         newMatch = _inPropertyList (requiredProperties,                         newMatch = _inPropertyList (requiredProperties,
                             newProperties);                             newProperties);
                         formerMatch = _inPropertyList (requiredProperties,                         formerMatch = _inPropertyList (requiredProperties,
                             oldProperties);                             oldProperties);
                     }  
  
                     //                     //
                     //  Add current subscription to appropriate list                     //  Add current subscription to appropriate list
                     //                     //
                     if (newMatch && !formerMatch)                     if (newMatch && !formerMatch)
                     {                     {
                         //              newSubscriptions.append (bothList [b]);
                         //  CIMInstances returned from repository do not  
                         //  include namespace  
                         //  Set namespace here  
                         //  
                         CIMObjectPath instanceName =  
                             subscriptions [j].getPath ();  
                         instanceName.setNameSpace (nameSpaceNames [i]);  
                         subscriptions [j].setPath (instanceName);  
                         newSubscriptions.append (subscriptions [j]);  
                     }                     }
                     else if (!newMatch && formerMatch)                     else if (!newMatch && formerMatch)
                     {                     {
                         //              formerSubscriptions.append (bothList [b]);
                         //  CIMInstances returned from repository do not          }
                         //  include namespace  
                         //  Set namespace here  
                         //  
                         CIMObjectPath instanceName =  
                             subscriptions [j].getPath ();  
                         instanceName.setNameSpace (nameSpaceNames [i]);  
                         subscriptions [j].setPath (instanceName);  
                         formerSubscriptions.append (subscriptions [j]);  
                     }                     }
                 }  // if subscription includes supported class  
             }  // if subscription is enabled  
         }  // for each subscription  
     }  // for each namespace  
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
Line 3132 
Line 3398 
     Array <CIMNamespaceName> nameSpaceNames;     Array <CIMNamespaceName> nameSpaceNames;
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::__getNameSpaceNames");                        "IndicationService::_getNameSpaceNames");
  
     _repository->read_lock ();     _repository->read_lock ();
  
Line 3250 
Line 3516 
     //     //
     //  Iterate through the subscription table     //  Iterate through the subscription table
     //     //
     for (SubscriptionTable::Iterator i = _subscriptionTable.start (); i; i++)      for (ActiveSubscriptionsTable::Iterator i =
           _activeSubscriptionsTable.start (); i; i++)
     {     {
         //         //
         //  If provider matches, append subscription to the list         //  If provider matches, append subscription to the list
         //         //
         if (i.value ().provider.identical (provider))          for (Uint8 j = 0; j < i.value ().providers.size (); j++)
           {
               ActiveSubscriptionsTableEntry tableValue = i.value ();
               if (tableValue.providers [j].provider.identical (provider))
               {
                   //
                   //  Add the subscription to the list
                   //
                   providerSubscriptions.append (tableValue.subscription);
   
                   //
                   //  Remove the provider from the list of providers serving the
                   //  subscription
                   //
                   tableValue.providers.remove (j);
                   _activeSubscriptionsTable.remove (i.key ());
   #ifdef PEGASUS_INDICATION_HASHTRACE
                   PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL,
                       Tracer::LEVEL3,
                       "REMOVED _activeSubscriptionsTable entry: " + i.key ());
   #endif
   
                   if (tableValue.providers.size () > 0)
                   {
                       //
                       //  Insert updated entry into Active Subscriptions table
                       //
                       _insertActiveSubscriptionsEntry (tableValue.subscription,
                           tableValue.providers);
                   }
                   else
         {         {
             providerSubscriptions.append (i.value ().subscription);                      //
                       //  If the terminated provider was the only provider serving
                       //  the subscription, implement the subscription's On Fatal
                       //  Error Policy
                       //
                       _handleError (tableValue.subscription);
                   }
               }
         }         }
     }     }
  
Line 3882 
Line 4186 
         if (handler == ref)         if (handler == ref)
         {         {
             Array <ProviderClassList> indicationProviders;             Array <ProviderClassList> indicationProviders;
               Array <CIMName> indicationSubclasses;
               CIMNamespaceName sourceNamespaceName;
             indicationProviders = _getDeleteParams (nameSpace,             indicationProviders = _getDeleteParams (nameSpace,
                 subscriptions [i]);                  subscriptions [i], indicationSubclasses, sourceNamespaceName);
  
             //             //
             //  Send Delete requests             //  Send Delete requests
Line 3981 
Line 4287 
         //         //
         //  ATTN-CAKG-P3-20020425: Log a message         //  ATTN-CAKG-P3-20020425: Log a message
         //         //
         //cout << "Exception: " << exception.getMessage () << endl;  
     }     }
  
     _repository->write_unlock ();     _repository->write_unlock ();
Line 4103 
Line 4408 
 void IndicationService::_getCreateParams ( void IndicationService::_getCreateParams (
     const CIMNamespaceName & nameSpaceName,     const CIMNamespaceName & nameSpaceName,
     const CIMInstance & subscriptionInstance,     const CIMInstance & subscriptionInstance,
       Array <CIMName> & indicationSubclasses,
     Array <ProviderClassList> & indicationProviders,     Array <ProviderClassList> & indicationProviders,
     CIMPropertyList & propertyList,     CIMPropertyList & propertyList,
     CIMNamespaceName & sourceNameSpace,     CIMNamespaceName & sourceNameSpace,
Line 4112 
Line 4418 
     String filterQuery;     String filterQuery;
     WQLSelectStatement selectStatement;     WQLSelectStatement selectStatement;
     CIMName indicationClassName;     CIMName indicationClassName;
     Array <CIMName> indicationSubclasses;  
     condition = String::EMPTY;     condition = String::EMPTY;
     queryLanguage = String::EMPTY;     queryLanguage = String::EMPTY;
  
Line 4169 
Line 4474 
 void IndicationService::_getCreateParams ( void IndicationService::_getCreateParams (
     const CIMNamespaceName & nameSpaceName,     const CIMNamespaceName & nameSpaceName,
     const CIMInstance & subscriptionInstance,     const CIMInstance & subscriptionInstance,
       Array <CIMName> & indicationSubclasses,
     CIMPropertyList & propertyList,     CIMPropertyList & propertyList,
     CIMNamespaceName & sourceNameSpace,     CIMNamespaceName & sourceNameSpace,
     String & condition,     String & condition,
Line 4206 
Line 4512 
         condition = _getCondition (filterQuery);         condition = _getCondition (filterQuery);
     }     }
  
       //
       //  Get indication class name from filter query (FROM clause)
       //
       indicationClassName = _getIndicationClassName (selectStatement,
           sourceNameSpace);
   
       //
       //  Get list of subclass names for indication class
       //
       indicationSubclasses = _getIndicationSubclasses (sourceNameSpace,
           indicationClassName);
   
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
  
 Array <ProviderClassList> IndicationService::_getDeleteParams ( Array <ProviderClassList> IndicationService::_getDeleteParams (
     const CIMNamespaceName & nameSpaceName,     const CIMNamespaceName & nameSpaceName,
     const CIMInstance & subscriptionInstance)      const CIMInstance & subscriptionInstance,
       Array <CIMName> & indicationSubclasses,
       CIMNamespaceName & sourceNameSpace)
 { {
     String filterQuery;     String filterQuery;
     CIMNamespaceName sourceNameSpace;  
     WQLSelectStatement selectStatement;     WQLSelectStatement selectStatement;
     CIMName indicationClassName;     CIMName indicationClassName;
     Array <CIMName> indicationSubclasses;  
     CIMPropertyList propertyList;     CIMPropertyList propertyList;
     Array <ProviderClassList> indicationProviders;     Array <ProviderClassList> indicationProviders;
  
Line 4251 
Line 4569 
         sourceNameSpace, indicationClassName);         sourceNameSpace, indicationClassName);
  
     //     //
     //  Get indication provider class lists      //  Get indication provider class lists from Active Subscriptions table
     //     //
     indicationProviders = _getIndicationProviders      String activeSubscriptionsKey = _generateActiveSubscriptionsKey
         (sourceNameSpace, indicationClassName, indicationSubclasses,          (subscriptionInstance.getPath ());
          propertyList);      ActiveSubscriptionsTableEntry tableValue;
       if (_activeSubscriptionsTable.lookup (activeSubscriptionsKey,
                       tableValue))
       {
           indicationProviders = tableValue.providers;
       }
       else
       {
           //
           //  ATTN-CAKG-P3-20030403: Log a message
           //
       }
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
     return indicationProviders;     return indicationProviders;
Line 4287 
Line 4616 
    PEGASUS_ASSERT(response != 0);    PEGASUS_ASSERT(response != 0);
    if (response->cimException.getCode() == CIM_ERR_SUCCESS)    if (response->cimException.getCode() == CIM_ERR_SUCCESS)
    {    {
       //cout << "Create accepted: " << response->messageId << endl;  
  
       //  
       //  Insert entry into subscription table  
       //  
       service->_insertEntry(*(epl->cni), epl->pcl->provider, epl->pcl->classList);  
   
 //      service->_insertEntry (subscription, indicationProviders [i].provider,  
 //                           indicationProviders [i].classList);  
    }    }
    else    else
    {    {
       //       //
       //  ATTN-CAKG-P3-20020326: Log a message       //  ATTN-CAKG-P3-20020326: Log a message
       //       //
   
       //cout << "Create rejected: " << response->messageId << endl;  
       //cout << "Error code: " << response->cimException.getCode () << endl;  
       //cout << response->cimException.getMessage () << endl;  
    }    }
  
    delete epl;    delete epl;
Line 4370 
Line 4687 
                  QueueIdStack (_providerManager, getQueueId ()),                  QueueIdStack (_providerManager, getQueueId ()),
                  authType,                  authType,
                  userName);                  userName);
 //cout << "Create message ID: " << request->messageId << endl;  
  
         AsyncOpNode* op = this->get_op();         AsyncOpNode* op = this->get_op();
  
Line 4436 
Line 4752 
     PEGASUS_ASSERT(response != 0);     PEGASUS_ASSERT(response != 0);
     if (response->cimException.getCode () == CIM_ERR_SUCCESS)     if (response->cimException.getCode () == CIM_ERR_SUCCESS)
     {     {
         //cout << "Modify accepted: " << response->messageId << endl;  
   
         //  
         //  Remove old entry from subscription table and insert  
         //  updated entry  
         //  
         String tableKey = service->_generateKey  
             (* (epl->cni), epl->pcl->provider);  
         service->_subscriptionTable.remove (tableKey);  
         //cout << "Old entry removed: " << tableKey << endl;  
         service->_insertEntry (* (epl->cni), epl->pcl->provider,  
             epl->pcl->classList);  
     }     }
     else     else
     {     {
Line 4455 
Line 4759 
         //  ATTN-CAKG-P3-20020326: Log a message         //  ATTN-CAKG-P3-20020326: Log a message
         //  Should the table entry be updated anyway?         //  Should the table entry be updated anyway?
         //         //
         //cout << "Modify rejected: " << response->messageId << endl;  
         //cout << "Error code: " << response->cimException.getCode () << endl;  
         //cout << response->cimException.getMessage () << endl;  
     }     }
  
     delete epl;     delete epl;
Line 4519 
Line 4820 
              QueueIdStack (_providerManager, getQueueId ()),              QueueIdStack (_providerManager, getQueueId ()),
              authType,              authType,
              userName);              userName);
 //cout << "Modify message ID: " << request->messageId << endl;  
  
         AsyncOpNode* op = this->get_op();         AsyncOpNode* op = this->get_op();
  
Line 4576 
Line 4876 
     PEGASUS_ASSERT (response != 0);     PEGASUS_ASSERT (response != 0);
     if (response->cimException.getCode () == CIM_ERR_SUCCESS)     if (response->cimException.getCode () == CIM_ERR_SUCCESS)
     {     {
         //cout << "Delete accepted: " << response->messageId << endl;  
         //  
         //  Remove entry from subscription table  
         //  
         String tableKey = service->_generateKey  
             (*(epl->cni), epl->pcl->provider);  
         service->_subscriptionTable.remove (tableKey);  
         //cout << "Entry removed: " << tableKey << endl;  
     }     }
     else     else
     {     {
Line 4591 
Line 4883 
         //  ATTN-CAKG-P3-20020326: Log a message         //  ATTN-CAKG-P3-20020326: Log a message
         //  Should the table entry be removed anyway?         //  Should the table entry be removed anyway?
         //         //
         //cout << "Delete rejected: " << response->messageId << endl;  
         //cout << "Error code: " << response->cimException.getCode () << endl;  
         //cout << response->cimException.getMessage () << endl;  
     }     }
  
     delete epl;     delete epl;
Line 4637 
Line 4926 
              QueueIdStack (_providerManager, getQueueId ()),              QueueIdStack (_providerManager, getQueueId ()),
              authType,              authType,
              userName);              userName);
 //cout << "Delete message ID: " << request->messageId << endl;  
  
         AsyncOpNode* op = this->get_op();         AsyncOpNode* op = this->get_op();
  
Line 4662 
Line 4950 
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
  
 String IndicationService::_generateKey (  String IndicationService::_generateActiveSubscriptionsKey (
     const CIMInstance & subscription,      const CIMObjectPath & subscriptionRef)
     const CIMInstance & provider)  
 { {
     String tableKey;      String activeSubscriptionsKey;
  
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_generateKey");                        "IndicationService::_generateActiveSubscriptionsKey");
  
     //     //
     //  Append subscription namespace name to key     //  Append subscription namespace name to key
     //     //
     tableKey.append (subscription.getPath ().getNameSpace ().getString());      activeSubscriptionsKey.append
           (subscriptionRef.getNameSpace ().getString());
   
       //
       //  Get filter and handler key bindings from subscription reference
       //
       Array<CIMKeyBinding> subscriptionKB = subscriptionRef.getKeyBindings ();
       Array<CIMKeyBinding> filterKB;
       Array<CIMKeyBinding> handlerKB;
       for (Uint8 i = 0; i < subscriptionKB.size (); i++)
       {
           if ((subscriptionKB [i].getName () == _PROPERTY_FILTER) &&
               (subscriptionKB [i].getType () == CIMKeyBinding::REFERENCE))
           {
               CIMObjectPath filterRef (subscriptionKB [i].getValue ());
               filterKB = filterRef.getKeyBindings ();
           }
           if ((subscriptionKB [i].getName () == _PROPERTY_HANDLER) &&
               (subscriptionKB [i].getType () == CIMKeyBinding::REFERENCE))
           {
               CIMObjectPath handlerRef (subscriptionKB [i].getValue ());
               handlerKB = handlerRef.getKeyBindings ();
           }
       }
  
     //     //
     //  Append subscription filter key values to key     //  Append subscription filter key values to key
     //     //
     CIMValue filterVal = subscription.getProperty      for (Uint8 j = 0; j < filterKB.size (); j++)
         (subscription.findProperty      {
         (_PROPERTY_FILTER)).getValue ();          activeSubscriptionsKey.append (filterKB [j].getValue ());
       }
   
       //
       //  Append subscription handler key values to key
       //
       for (Uint8 k = 0; k < handlerKB.size (); k++)
       {
           activeSubscriptionsKey.append (handlerKB [k].getValue ());
       }
   
       PEG_METHOD_EXIT ();
       return activeSubscriptionsKey;
   }
   
   void IndicationService::_insertActiveSubscriptionsEntry (
       const CIMInstance & subscription,
       const Array <ProviderClassList> & providers)
   {
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_insertActiveSubscriptionsEntry");
  
     CIMObjectPath filterRef;      String activeSubscriptionsKey = _generateActiveSubscriptionsKey
     filterVal.get (filterRef);          (subscription.getPath ());
       ActiveSubscriptionsTableEntry entry;
       entry.subscription = subscription;
       entry.providers = providers;
       _activeSubscriptionsTable.insert (activeSubscriptionsKey, entry);
  
     Array <CIMKeyBinding> filterKeyBindings = filterRef.getKeyBindings ();  #ifdef PEGASUS_INDICATION_HASHTRACE
     for (Uint8 i = 0; i < filterKeyBindings.size (); i++)      String traceString;
       traceString.append (activeSubscriptionsKey);
       traceString.append (" Providers: ");
       for (Uint8 i = 0; i < providers.size (); i++)
       {
           String providerName = providers [i].provider.getProperty
               (providers [i].provider.findProperty
               (_PROPERTY_NAME)).getValue ().toString ();
           traceString.append (providerName);
           traceString.append ("  Classes: ");
           for (Uint8 j = 0; j < providers[i].classList.size (); j++)
     {     {
         tableKey.append (filterKeyBindings [i].getValue ());               traceString.append (providers[i].classList[j].getString());
                traceString.append ("  ");
     }     }
       }
   
       PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL3,
           "INSERTED _activeSubscriptionsTable entry: " + traceString);
   #endif
   
       PEG_METHOD_EXIT ();
   }
   
   String IndicationService::_generateSubscriptionClassesKey (
       const CIMName & indicationClassName,
       const CIMNamespaceName & sourceNamespaceName)
   {
       String subscriptionClassesKey;
   
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_generateSubscriptionClassesKey");
  
     //     //
     //  Append subscription handler key values to key      //  Append indication class name to key
     //     //
     CIMValue handlerVal = subscription.getProperty      subscriptionClassesKey.append (indicationClassName.getString ());
         (subscription.findProperty  
         (_PROPERTY_HANDLER)).getValue ();  
  
     CIMObjectPath handlerRef;      //
     handlerVal.get (handlerRef);      //  Append source namespace name to key
       //
       subscriptionClassesKey.append (sourceNamespaceName.getString ());
   
       PEG_METHOD_EXIT ();
       return subscriptionClassesKey;
   }
   
   void IndicationService::_insertSubscriptionClassesEntry (
       const CIMName & indicationClassName,
       const CIMNamespaceName & sourceNamespaceName,
       const Array <CIMInstance> & subscriptions)
   {
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_insertSubscriptionClassesEntry");
  
     Array <CIMKeyBinding> HandlerKeyBindings = handlerRef.getKeyBindings ();      String subscriptionClassesKey = _generateSubscriptionClassesKey
     for (Uint8 i = 0; i < HandlerKeyBindings.size (); i++)          (indicationClassName, sourceNamespaceName);
       SubscriptionClassesTableEntry entry;
       entry.indicationClassName = indicationClassName;
       entry.sourceNamespaceName = sourceNamespaceName;
       entry.subscriptions = subscriptions;
       _subscriptionClassesTable.insert (subscriptionClassesKey, entry);
   
   #ifdef PEGASUS_INDICATION_HASHTRACE
       String traceString;
       traceString.append (subscriptionClassesKey);
       traceString.append (" Subscriptions: ");
       for (Uint8 i = 0; i < subscriptions.size (); i++)
     {     {
         tableKey.append (HandlerKeyBindings [i].getValue ());          traceString.append (subscriptions [i].getPath ().toString());
           traceString.append ("  ");
       }
   
       PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL3,
           "INSERTED _subscriptionClassesTable entry: " + traceString);
   #endif
   
       PEG_METHOD_EXIT ();
     }     }
  
   void IndicationService::_insertToHashTables (
       const CIMInstance & subscription,
       const Array <ProviderClassList> & providers,
       const Array <CIMName> & indicationSubclassNames,
       const CIMNamespaceName & sourceNamespaceName)
   {
       PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                         "IndicationService::_insertToHashTables");
   
       //
       //  Insert entry into active subscriptions table
       //
       _insertActiveSubscriptionsEntry (subscription, providers);
   
       //
       //  Insert or update entries in subscription classes table
       //
       for (Uint8 i = 0; i < indicationSubclassNames.size (); i++)
       {
           String subscriptionClassesKey = _generateSubscriptionClassesKey
               (indicationSubclassNames [i], sourceNamespaceName);
           SubscriptionClassesTableEntry tableValue;
           if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
               tableValue))
           {
     //     //
     //  Append provider key values to key              //  If entry exists for this IndicationClassName-SourceNamespace
               //  pair, remove old entry and insert new entry
     //     //
     String providerName = provider.getProperty (provider.findProperty              Array <CIMInstance> subscriptions = tableValue.subscriptions;
         (_PROPERTY_PROVIDERNAME)).getValue ().toString ();              subscriptions.append (subscription);
     String providerModuleName = provider.getProperty (provider.findProperty              _subscriptionClassesTable.remove (subscriptionClassesKey);
         (_PROPERTY_PROVIDERMODULENAME)).getValue ().toString ();  #ifdef PEGASUS_INDICATION_HASHTRACE
     tableKey.append (providerName);              PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL3,
     tableKey.append (providerModuleName);                  "REMOVED _subscriptionClassesTable entry: " +
                   subscriptionClassesKey);
   #endif
               _insertSubscriptionClassesEntry (indicationSubclassNames [i],
                   sourceNamespaceName, subscriptions);
           }
           else
           {
               //
               //  If no entry exists for this
               //  IndicationClassName-SourceNamespace pair, insert new entry
               //
               Array <CIMInstance> subscriptions;
               subscriptions.append (subscription);
               _insertSubscriptionClassesEntry (indicationSubclassNames [i],
                   sourceNamespaceName, subscriptions);
           }
       }
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
     return tableKey;  
 } }
  
 void IndicationService::_insertEntry (  void IndicationService::_removeFromHashTables (
     const CIMInstance & subscription,     const CIMInstance & subscription,
     const CIMInstance & provider,      const Array <CIMName> & indicationSubclassNames,
     const Array <CIMName> classList)      const CIMNamespaceName & sourceNamespaceName)
 { {
     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,     PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
                       "IndicationService::_insertEntry");                        "IndicationService::_removeFromHashTables");
  
     String tableKey = _generateKey      //
         (subscription, provider);      //  Remove entry from active subscriptions table
     SubscriptionTableEntry entry;      //
     entry.subscription = subscription;      String activeSubscriptionsKey = _generateActiveSubscriptionsKey
     entry.provider = provider;          (subscription.getPath ());
     entry.classList = classList;      _activeSubscriptionsTable.remove (activeSubscriptionsKey);
     _subscriptionTable.insert (tableKey, entry);  
 //cout << "Entry inserted: " << tableKey << endl;  #ifdef PEGASUS_INDICATION_HASHTRACE
       PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL3,
           "REMOVED _activeSubscriptionsTable entry: " +
           activeSubscriptionsKey);
   #endif
   
       //
       //  Remove or update entries in subscription classes table
       //
       for (Uint8 i = 0; i < indicationSubclassNames.size (); i++)
       {
           String subscriptionClassesKey = _generateSubscriptionClassesKey
               (indicationSubclassNames [i], sourceNamespaceName);
           SubscriptionClassesTableEntry tableValue;
           if (_subscriptionClassesTable.lookup (subscriptionClassesKey,
               tableValue))
           {
               //
               //  If entry exists for this IndicationClassName-SourceNamespace
               //  pair, remove subscription from the list
               //
               Array <CIMInstance> subscriptions = tableValue.subscriptions;
               for (Uint8 j = 0; j < subscriptions.size (); j++)
               {
                   if (subscriptions [j].getPath().identical
                      (subscription.getPath()))
                   {
                       subscriptions.remove (j);
                   }
               }
   
               //
               //  Remove the old entry
               //
               _subscriptionClassesTable.remove (subscriptionClassesKey);
   #ifdef PEGASUS_INDICATION_HASHTRACE
               PEG_TRACE_STRING (TRC_INDICATION_SERVICE_INTERNAL, Tracer::LEVEL3,
                   "REMOVED _subscriptionClassesTable entry: " +
                   subscriptionClassesKey);
   #endif
   
               //
               //  If there are still subscriptions in the list, insert the
               //  new entry
               //
               if (subscriptions.size () > 0)
               {
                   _insertSubscriptionClassesEntry (indicationSubclassNames [i],
                       sourceNamespaceName, subscriptions);
               }
           }
           else
           {
               //
               //  Entry not found in Subscription Classes table
               //
   
               //
               //  ATTN-CAKG-P3-20030403: Log a message
               //
           }
       }
  
     PEG_METHOD_EXIT ();     PEG_METHOD_EXIT ();
 } }
Line 4821 
Line 5317 
    PEGASUS_ASSERT(response != 0);    PEGASUS_ASSERT(response != 0);
    if (response->cimException.getCode() == CIM_ERR_SUCCESS)    if (response->cimException.getCode() == CIM_ERR_SUCCESS)
    {    {
       //cout << "Alert accepted: " << response->messageId << endl;  
    }    }
    else    else
    {    {
       //cout << "Alert rejected: " << response->messageId << endl;  
       //cout << "Error code: " << response->cimException.getCode () << endl;  
       //cout << response->cimException.getMessage () << endl;  
    }    }
  
    //    //
Line 4845 
Line 5337 
    delete asyncReply;    delete asyncReply;
    op->release();    op->release();
    service->return_op(op);    service->return_op(op);
   
       PEG_METHOD_EXIT ();
 } }
  
  
Line 4860 
Line 5354 
  
     handlers.clear ();     handlers.clear ();
  
       PEG_TRACE_STRING (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
           "Sending alert: " + alertInstance.getClassName().getString());
   
     //     //
     //  Get list of unique handler instances for all subscriptions in list     //  Get list of unique handler instances for all subscriptions in list
     //     //
     for (Uint8 i = 0; i < subscriptions.size (); i++)     for (Uint8 i = 0; i < subscriptions.size (); i++)
     {     {
           PEG_TRACE_STRING (TRC_INDICATION_SERVICE, Tracer::LEVEL4,
               "Alert subscription: " + subscriptions [i].getPath().toString());
   
         //         //
         //  Get handler instance         //  Get handler instance
         //         //
Line 4901 
Line 5401 
                 handlers[k],                 handlers[k],
                 alertInstance,                 alertInstance,
                 QueueIdStack (_handlerService, getQueueId ()));                 QueueIdStack (_handlerService, getQueueId ()));
 //cout << "Alert message ID: " << handler_request->messageId << endl;  
  
         AsyncOpNode* op = this->get_op();         AsyncOpNode* op = this->get_op();
  
Line 4952 
Line 5451 
  
     if (response->cimException.getCode () == CIM_ERR_SUCCESS)     if (response->cimException.getCode () == CIM_ERR_SUCCESS)
     {     {
       //cout << "Enable accepted: " << response->messageId << endl;  
     }     }
     else     else
     {     {
       //cout << "Enable rejected: " << response->messageId << endl;  
       //cout << "Error code: " << response->cimException.getCode () << endl;  
       //cout << response->cimException.getMessage () << endl;  
     }     }
  
    //    //
Line 4989 
Line 5484 
              enableProvider.provider,              enableProvider.provider,
              enableProvider.providerModule,              enableProvider.providerModule,
              QueueIdStack (_providerManager, getQueueId ()));              QueueIdStack (_providerManager, getQueueId ()));
 //cout << "Enable message ID: " << request->messageId << endl;  
  
     AsyncOpNode* op = this->get_op ();     AsyncOpNode* op = this->get_op ();
  


Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2