[IOT-3090] disable /sp Resource 37/25837/2 1.4.0-RC2
authorNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Sun, 17 Jun 2018 02:27:37 +0000 (19:27 -0700)
committerAleksey Volkov <a.volkov@samsung.com>
Mon, 18 Jun 2018 11:57:30 +0000 (11:57 +0000)
/sp Resource must be temporarily disabled until CTT is updated to recognize
it (~Bangkok point release) else it causes CTT failures.

Change-Id: Id52c8acaf5a76e727bedf28288c08472255a988a
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
resource/csdk/security/src/spresource.c

index 5db5df6..a019f62 100644 (file)
@@ -939,9 +939,13 @@ OCEntityHandlerResult SpEntityHandler(OCEntityHandlerFlag flag,
     return ehRet;
 }
 
+#define SP_RESOURCE_DISABLE
 OCStackResult CreateSpResource()
 {
-    OCStackResult ret = OCCreateResource(&gSpHandle,
+    OCStackResult ret = OC_STACK_OK;
+
+#ifndef SP_RESOURCE_DISABLE
+    ret = OCCreateResource(&gSpHandle,
                                          OIC_RSRC_TYPE_SEC_SP,
                                          OC_RSRVD_INTERFACE_DEFAULT,
                                          OIC_RSRC_SP_URI,
@@ -954,6 +958,10 @@ OCStackResult CreateSpResource()
         OIC_LOG(FATAL, TAG, "Unable to instantiate sp resource");
         DeInitSpResource();
     }
+#else
+    OIC_LOG_V(WARNING, TAG, "/sp Resource disabled in this build; not creating Resource.");
+#endif // SP_RESOURCE_DISABLE
+
     return ret;
 }