Fix bug for can not callback on consumer cpp layer.
authorKIM JungYong <jyong2.kim@samsung.com>
Mon, 31 Oct 2016 02:49:12 +0000 (11:49 +0900)
committerUze Choi <uzchoi@samsung.com>
Fri, 18 Nov 2016 00:49:22 +0000 (00:49 +0000)
commit478218375f983c8d9ee2bb41d912e0f3f02238b9
tree10012cdab9942d90ee7d7d84596b7dbc0decd02c
parent9b1a61ecfae082361adac44e9f6e5177a6b46200
Fix bug for can not callback on consumer cpp layer.

When starting consumer service, getTopic callback fisrt
and then discover callback due to can not call both changed callback and discover callback.
because when callback getTopic, NSProvider instance does not set the listener,
and when callback discover after, NSProvider instance already create, so can not callback discover.
This point is invalid logic on CPP layer.

With this patch, altough call getTopic first, can callback discover callback.

Change-Id: Ib7a3c8cf3e78edf24d0251227c5d3c225c3ba3a4
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13855
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 6124156346ad25e57fb1489ccd7febf532c58fa6)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13863
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
service/notification/cpp-wrapper/consumer/src/NSConsumerService.cpp