Fix Discovery Payload
authorOmkar Hegde <omkar.m.hegde@intel.com>
Tue, 14 Jul 2015 21:02:07 +0000 (14:02 -0700)
committerErich Keane <erich.keane@intel.com>
Tue, 14 Jul 2015 21:58:06 +0000 (21:58 +0000)
We were accidentally accessing the resource types
instead of interface name when doing discovery response.
The issue could be seen on running collection samples.

Change-Id: Iabd132e1a8b85b1c8f9890ae2db1a35983bee938
Signed-off-by: Omkar Hegde <omkar.m.hegde@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1651
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/src/ocpayload.c

index 69cab70..ce82edc 100644 (file)
@@ -1170,7 +1170,7 @@ static OCResourcePayload* OCCopyResource(const OCResource* res, uint16_t port)
         pl->interfaces = (OCStringLL*)OICCalloc(1, sizeof(OCStringLL));
         pl->interfaces->value = OICStrdup(ifPtr->name);
 
-        OCStringLL* cur = pl->types;
+        OCStringLL* cur = pl->interfaces;
         ifPtr = ifPtr->next;
         while(ifPtr)
         {