Fix for IOT-769. Sets the uri in OCRepresentation
authorRahul Rahul <rahul.rahul@intel.com>
Tue, 24 Nov 2015 22:54:14 +0000 (14:54 -0800)
committerJon A. Cruz <jonc@osg.samsung.com>
Fri, 4 Dec 2015 22:50:01 +0000 (22:50 +0000)
sent by the server as a response to a client query.

Change-Id: I1c432ce66ba912d04a1b5b35374cf53cf6f95c4b
Signed-off-by: Rahul Rahul <rahul.rahul@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4329
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/examples/fridgeclient.cpp
resource/src/InProcClientWrapper.cpp

index 0c7075a..bbbc748 100644 (file)
@@ -187,6 +187,7 @@ class ClientFridge
         std::cout << "Got a response from get from the " << resourceName << std::endl;
         std::cout << "Get ID is "<<getId<<" and resource URI is " << resource->uri() << std::endl;
         std::cout << "Get eCode is "<< eCode << std::endl;
+        std::cout << "OCRepresentation uri is " << rep.getUri() << std::endl;
 
         printHeaderOptions(headerOptions);
 
index f441ca9..7134fed 100644 (file)
@@ -124,6 +124,7 @@ namespace OC
         // first one is considered the root, everything else is considered a child of this one.
         OCRepresentation root = *it;
         root.setDevAddr(clientResponse->devAddr);
+        root.setUri(clientResponse->resourceUri);
         ++it;
 
         std::for_each(it, oc.representations().end(),