BUG#: 6483
authorvenkat.puvvada <venkat.puvvada>
Wed, 13 Jun 2007 09:21:13 +0000 (09:21 +0000)
committervenkat.puvvada <venkat.puvvada>
Wed, 13 Jun 2007 09:21:13 +0000 (09:21 +0000)
TITLE: Incorrect CBGetClassification macro

src/Pegasus/Provider/CMPI/cmpimacs.h
src/Providers/TestProviders/CMPI/TestError/cmpiTestErrorProvider.c
src/Providers/TestProviders/CMPI/TestError/tests/TestCMPIError.loggood

index d23c99b58dd6b2982da227108089d7c9471e3794..a1642d6ca750b92f80f8fa9f991dc71ce9a1bd35 100644 (file)
@@ -2222,12 +2222,12 @@ inline static int CMEvaluatePredicateUsingAccessor
          See CMPI_MB_Class_x and CMPI_MB_Supports_xxx flags.
      */
 inline static unsigned long
-CBGetClassification (const CMPIBroker * mb)
+CBGetBrokerCapabilities (const CMPIBroker * mb)
 {
-  return ((mb)->bft->brokerClassification);
+  return ((mb)->bft-> brokerCapabilities);  
 }
 #   else
-#      define CBGetClassification(b)         ((b)->bft->brokerClassification)
+#      define CBGetBrokerCapabilities(b) ((b)->bft->brokerCapabilities) 
 #   endif
 
 #   ifdef CMPI_INLINE
index 58ab7e7932f63c2a73e356e58f621145371e5dd4..02d11eece70259e34f10408af0a5c9b5151eda63 100644 (file)
@@ -73,6 +73,7 @@ TestCMPIErrorProviderInvokeMethod (CMPIMethodMI * mi,
   CMPIError *cmpiErrorClone;
   CMPICount i, arrSize;
 
+  CMPIUint32 brokerCapabilities;
   /* CMPIError data */
   const char* inOwningEntity = "ACME";
   CMPIString* outOwningEntity;
@@ -109,6 +110,20 @@ TestCMPIErrorProviderInvokeMethod (CMPIMethodMI * mi,
 
   PROV_LOG_OPEN (_ClassName, _ProviderLocation);
 
+  PROV_LOG ("Calling CBGetBrokerCapabilities");
+  brokerCapabilities = CBGetBrokerCapabilities(_broker);
+  if (brokerCapabilities & CMPI_MB_Supports_Extended_Error)
+  {
+      PROV_LOG("CMPI_MB_Supports_Extended_Error Support : True");
+  }
+  else
+  {
+      PROV_LOG("CMPI_MB_Supports_Extended_Error Support : False");
+      CMReturnWithString(CMPI_RC_ERR_NOT_SUPPORTED, 
+          CMNewString(_broker,
+          "Extended error support not avilable", NULL));
+  } 
+
   PROV_LOG ("--- %s CMPI InvokeMethod() called", _ClassName);
 
   class = CMGetClassName (ref, &rc);
index 21fe38d38b554ec12e9bfb677500d8ab067815a1..5d2fd6f5163878fb84a1459ba13c7ef723ac43d4 100644 (file)
@@ -1,3 +1,5 @@
+ Calling CBGetBrokerCapabilities
+ CMPI_MB_Supports_Extended_Error Support : True
  --- TestCMPI_Error CMPI InvokeMethod() called
  InvokeMethod: checking for correct classname [TestCMPI_Error]
  Calling CMNewCMPIError