Fix C client to receive presence notifications.
authorMandeep Shetty <mandeep.shetty@intel.com>
Wed, 1 Apr 2015 18:12:44 +0000 (11:12 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 3 Apr 2015 17:46:51 +0000 (17:46 +0000)
This fixes IOT-432.
Make occlient.cpp subscribe to the same resource ocserver.cpp is sending
out presence notifications on. Server sends out notifications for
core.led while client was subscribed to core.light.

Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Change-Id: I8aeb96b981f1bb71ce0661f1fa54d58ba1a19b8c
Reviewed-on: https://gerrit.iotivity.org/gerrit/626
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp

index 3ed35e2..4b78752 100644 (file)
@@ -453,7 +453,7 @@ int InitPresence()
     if(TEST_CASE == TEST_OBS_PRESENCE_WITH_FILTER || TEST_CASE == TEST_OBS_PRESENCE_WITH_FILTERS)
     {
         querySuffix.str("");
-        querySuffix << query.str() << "?rt=core.light";
+        querySuffix << query.str() << "?rt=core.led";
         result = InvokeOCDoResource(querySuffix, OC_REST_PRESENCE, OC_LOW_QOS,
                 presenceCB, NULL, 0);
     }