[IOT-1671] Fixed base layer terminate logic
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 15 Dec 2016 09:10:47 +0000 (18:10 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 22 Dec 2016 13:01:15 +0000 (13:01 +0000)
commitb91924fbca5d48d8ed26a1d766aedc14d080f6be
treeeb99dfcfd13d39ff16bac065ba9a11b6684841d0
parent7525c696f9f8401b120c586f5c7d0d7645e7cd2f
[IOT-1671] Fixed base layer terminate logic

- ObserverList should be removed before destroying ResourceList
to avoid the error of dangling pointer. because ResourceObserver
object includes a resource handle which is memory address allocated
when resource is created.
- Add function to unset network monitoring callback when OCStop()
is called.

Change-Id: I7c0a11c029054163996f00bd760b1445fb6a7899
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15693
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Hyuna Jo <hyuna0213.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/stack/src/ocstack.c