From: Sakthivel Samidurai Date: Mon, 12 Jan 2015 19:56:27 +0000 (-0300) Subject: Integrate OCStop API with CA X-Git-Tag: 1.2.0+RC1~1855^2~282 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20878102b6c6fbb13363263549f7a1efda464a91;p=platform%2Fupstream%2Fiotivity.git Integrate OCStop API with CA OCStop to call CATerminate for the CA intgeration Change-Id: I2d408715256cce7fe6236348fd362a59dd5c60be Signed-off-by: Sakthivel Samidurai --- diff --git a/resource/csdk/stack/src/ocstack.c b/resource/csdk/stack/src/ocstack.c index 7f31347..cd4ea07 100644 --- a/resource/csdk/stack/src/ocstack.c +++ b/resource/csdk/stack/src/ocstack.c @@ -1348,9 +1348,15 @@ OCStackResult OCStop() // 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();