Hold GetTopics API return until related code finishes in the other thread
authorjaesick.shin <jaesick.shin@samsung.com>
Sun, 4 Sep 2016 22:17:02 +0000 (07:17 +0900)
committerUze Choi <uzchoi@samsung.com>
Tue, 6 Sep 2016 10:23:53 +0000 (10:23 +0000)
commitac3918b8b529bdf4c639fe333da2c93f36620684
treef6485f94f8bb7b93ab52ee85c06289ca39ab989f
parente03ff7b09dd5e75961efe39e0f6f84eb2ee9b6d6
Hold GetTopics API return until related code finishes in the other thread

Issue: Crash happen Get Topic just after Topic registration.
 (between RegistrerTopic and GetTopics/GetConsumerTopic APIs)

Fix: apply condition variable to RegistrerTopic API logic and
     GetTopics/GetConsumerTopic API logic.

Other Fixes:
 locking the NSProviderInterface.
 modify unittest for functions of 1 and 2.

Change-Id: Ia8e75d7b21198b3d4c3810050baa0867d60eeb78
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11365
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/common/NSConstants.h
service/notification/src/provider/NSProviderInterface.c
service/notification/src/provider/NSProviderTopic.c
service/notification/src/provider/NSProviderTopic.h
service/notification/unittest/NSProviderTest.cpp