From: Rahul Rahul Date: Tue, 24 Nov 2015 22:54:14 +0000 (-0800) Subject: Fix for IOT-769. Sets the uri in OCRepresentation X-Git-Tag: 1.2.0+RC1~802 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=057930d21941589a7aec5462c91631347322ba8c;p=platform%2Fupstream%2Fiotivity.git Fix for IOT-769. Sets the uri in OCRepresentation sent by the server as a response to a client query. Change-Id: I1c432ce66ba912d04a1b5b35374cf53cf6f95c4b Signed-off-by: Rahul Rahul Reviewed-on: https://gerrit.iotivity.org/gerrit/4329 Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- diff --git a/resource/examples/fridgeclient.cpp b/resource/examples/fridgeclient.cpp index 0c7075a..bbbc748 100644 --- a/resource/examples/fridgeclient.cpp +++ b/resource/examples/fridgeclient.cpp @@ -187,6 +187,7 @@ class ClientFridge std::cout << "Got a response from get from the " << resourceName << std::endl; std::cout << "Get ID is "<uri() << std::endl; std::cout << "Get eCode is "<< eCode << std::endl; + std::cout << "OCRepresentation uri is " << rep.getUri() << std::endl; printHeaderOptions(headerOptions); diff --git a/resource/src/InProcClientWrapper.cpp b/resource/src/InProcClientWrapper.cpp index f441ca9..7134fed 100644 --- a/resource/src/InProcClientWrapper.cpp +++ b/resource/src/InProcClientWrapper.cpp @@ -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(),