Make sure the Platform Resource and Device Resource have 2 interfaces.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Tue, 15 Dec 2015 06:11:36 +0000 (22:11 -0800)
committerJon A. Cruz <jonc@osg.samsung.com>
Tue, 15 Dec 2015 10:03:27 +0000 (10:03 +0000)
The /oic/d and /oic/p resources must have oic.if.r and oic.if.baseline
interfaces specified.

This is also for IOT-874.

Change-Id: Ia6a666c03e954634d4589c2bbe8a3a4d72ad8a86
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4587
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/stack/src/ocstack.c

index ae5beb6..060ea88 100755 (executable)
@@ -3746,6 +3746,11 @@ OCStackResult initResources()
                                   NULL,
                                   NULL,
                                   OC_DISCOVERABLE);
+        if(result == OC_STACK_OK)
+        {
+            result = BindResourceInterfaceToResource((OCResource *)deviceResource,
+                                                     OC_RSRVD_INTERFACE_READ);
+        }
     }
 
     if(result == OC_STACK_OK)
@@ -3757,6 +3762,11 @@ OCStackResult initResources()
                                   NULL,
                                   NULL,
                                   OC_DISCOVERABLE);
+        if(result == OC_STACK_OK)
+        {
+            result = BindResourceInterfaceToResource((OCResource *)platformResource,
+                                                     OC_RSRVD_INTERFACE_READ);
+        }
     }
 
     return result;