Hi all,

I have made one change in iotivity-1.2.1 the ocstack.c to get the
constrained URI and rich server URI in callback (GET, PUT, POST, OBSERVE)
file check, Please.

To get URI of server in callback  added following line (*response.resourceUri
= cbNode->requestUri;*) in ocstack.c
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                            OIC_LOG_V(INFO, TAG, "Assuming
PAYLOAD_TYPE_REPRESENTATION: %d %s",
                                    cbNode->method, cbNode->requestUri);
                            type = PAYLOAD_TYPE_REPRESENTATION;
                            *response.resourceUri = cbNode->requestUri;*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

On Fri, May 26, 2017 at 11:06 AM, Jotirling Swami <
jotirling.swami at smartron.com> wrote:

> Hi all,
>
> I am working on the iotivity-1.2.1 and Iotivity-constrained using
> (git clone https://gerrit.iotivity.org/gerrit/iotivity-constrained)
> for building constrained server. After completing DISCOVERY through
> Iotivity rich client on constrained servers all resource coming.
>
> 1. When the client sends GET request to constrained server in GET callback
> the URI is not coming *( **rep.getHost()* is coming, but *rep.getUri()*
> show NULL), but after running with scons LOGGING=1 the resource URI in the
> callback is coming in ocstack.c
>
> (OIC_LOG_V(INFO, TAG, "Assuming PAYLOAD_TYPE_REPRESENTATION: %d %s",
>                                     cbNode->method, *cbNode->requestUri*
> );)
>
> My questing is why it's not coming in rep.getUri() API because in
> OCRepresentation.cpp the URI is not storing in representation. it's
> happening with the only constrained server, using rich Iotivity server the
> URI is coming in *rep.getUri()*.
>
> (Need to see ocstack.c and OCRepresentation.cpp I guess)
>
> 2. Recently I downloaded the Iotivity source code from Gerrit site
>  (git clone https://gerrit.iotivity.org/gerrit/iotivity)
> After building completely when I do DISCOVERY constrained server are not
> discovering, where all resource properly discovering in Iotivity-1.2.1
> source code.
>
> Regards,
> Jotirling Swami.
>
>
>
>
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170526/ea446752/attachment.html>

Reply via email to