Modify topic notification filter for remote message
authorcc <ch79.cho@samsung.com>
Thu, 1 Sep 2016 01:45:29 +0000 (10:45 +0900)
committerUze Choi <uzchoi@samsung.com>
Thu, 1 Sep 2016 12:37:03 +0000 (12:37 +0000)
This patch is bug-fix which adds topic notification filter for remote msg.

Change-Id: I90ae060ab2a5385fdd3c66c2614c5dd4933d83ab
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11237
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/provider/NSProviderNotification.c

index 571419e..6547e52 100644 (file)
@@ -143,9 +143,13 @@ NSResult NSSendNotification(NSMessage *msg)
 #ifdef RD_CLIENT
             if(subData->remote_messageObId != 0)
             {
-                if(NSProviderIsTopicSubScribed(consumerTopicList->head, subData->id, msg->topic))
+                if(msg->topic)
                 {
-                    obArray[obCount++] = subData->remote_messageObId;
+                    NS_LOG_V(DEBUG, "this is topic message via remote server: %s", msg->topic);
+                    if(NSProviderIsTopicSubScribed(consumerTopicList->head, subData->id, msg->topic))
+                    {
+                        obArray[obCount++] = subData->remote_messageObId;
+                    }
                 }
                 else
                 {