Fixed issue where "oic.wk.d" was removed from array of device types.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Sat, 2 Jul 2016 23:33:39 +0000 (16:33 -0700)
committerZiran Sun <ziran.sun@samsung.com>
Fri, 8 Jul 2016 08:18:12 +0000 (08:18 +0000)
Change-Id: I54ee75be4e7bbb9ce4de2b656dabff4c6386d58f
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9107
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/stack/include/ocstack.h
resource/csdk/stack/src/ocstack.c

index 7f20e18..72325a2 100644 (file)
@@ -233,7 +233,13 @@ OC_EXPORT OCStackResult OCSetDefaultDeviceEntityHandler(OCDeviceEntityHandler en
 /**
  * This function sets device information.
  *
- * @param deviceInfo   Structure passed by the server application containing the device information.
+ * Upon call to OCInit, the default Device Type (i.e. "rt") has already been set to the default
+ * Device Type "oic.wk.d". You do not have to specify "oic.wk.d" in the OCDeviceInfo.types linked
+ * list. The default Device Type is mandatory and always specified by this Device as the first
+ * Device Type.
+ *
+ * @param deviceInfo   Structure passed by the server application containing the device
+ *                     information.
  *
  * @return
  *     ::OC_STACK_OK               no errors.
index 1b06e18..a578533 100644 (file)
@@ -3076,8 +3076,6 @@ OCStackResult OCSetDeviceInfo(OCDeviceInfo deviceInfo)
         {
             return OC_STACK_INVALID_PARAM;
         }
-        deleteResourceType(resource->rsrcType);
-        resource->rsrcType = NULL;
 
         while (type)
         {