Fixed bug for duplicated request to subscribe and invalid storage logic.
authorKIM JungYong <jyong2.kim@samsung.com>
Tue, 19 Jul 2016 07:39:10 +0000 (16:39 +0900)
committerUze Choi <uzchoi@samsung.com>
Thu, 21 Jul 2016 06:00:49 +0000 (06:00 +0000)
commit4a8def886c6518697bc78fc57e7fccd4e9fe3638
tree19b3008da283275a0bd2c2e64d60048320c852b6
parent2f1f37cbb55ba63825a2863285848bd3469fbd1b
Fixed bug for duplicated request to subscribe and invalid storage logic.

This patch is fixed bug for

1. Duplicated request to subscribe to notification providers.
NSProviderConnectionInfo need to have boolean for subscribe status.

2. When NSConsumer is restarted, message/provider storage had invalid informations.
because they has previous address since first allocated.

3. When Provider re-discovered by consumer discovery module,
provider information never change to latest information about acceptance,
even though discovered provider information has difference information with previous.

bug fix for invalid storage logic(e.g. 2, 3) and access to null pointer.
Boolean for subscribe status is added on NSProviderConnectionInfo sturcture
and subscribe trigger point is fixed.
Macro for verify of return type(OCStackResult) is update for return Success.

Change-Id: If460a841b0bcff064eab8c0b884a06cffa7284d6
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9459
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/consumer/NSConsumerCommon.c
service/notification/src/consumer/NSConsumerCommon.h
service/notification/src/consumer/NSConsumerCommunication.c
service/notification/src/consumer/NSConsumerDiscovery.c
service/notification/src/consumer/NSConsumerInternalTaskController.c
service/notification/src/consumer/NSConsumerNetworkEventListener.c
service/notification/src/consumer/NSConsumerQueue.c
service/notification/src/consumer/NSConsumerScheduler.c
service/notification/src/consumer/cache/linux/NSConsumerMemoryCache.c