OCStop to call CATerminate for the CA intgeration
Change-Id: I2d408715256cce7fe6236348fd362a59dd5c60be
Signed-off-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
// Free memory dynamically allocated for resources
deleteAllResources();
DeleteDeviceInfo();
+#ifdef CA_INT
+ CATerminate();
+ //CATerminate does not return any error code. It is OK to assign result to OC_STACK_OK.
+ result = OC_STACK_OK;
+#else //CA_INT
+ result = OCStopCoAP();
+#endif //CA_INT
- // Make call to OCCoAP layer
- if (OCStopCoAP() == OC_STACK_OK)
+ if (result == OC_STACK_OK)
{
// Remove all observers
DeleteObserverList();