resource: Fix occlientbasicops to support coaps 37/23637/5
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Tue, 5 Dec 2017 15:20:02 +0000 (16:20 +0100)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Wed, 13 Dec 2017 16:23:24 +0000 (16:23 +0000)
commit0f2ae826a9dbe6ad3f328c24a556d6786b31a6bc
tree8a74a5095eda146733cf2d4db53c2e7a121b1c05
parent4239a6c37d27f1d0b776f32a211be6bba7e4d5f8
resource: Fix occlientbasicops to support coaps

The fix is to do querry only on resource's address (to use CoAPs channel)

Observed issue was:

 ./ocserverbasicops

  ./occlientbasicops -u 0 -c 0 -d 1 -p 0 -t 2
  (...)

  INFO: occlientbasicops: Callback Context for GET query recvd successfully
  INFO: occlientbasicops: StackResult: OC_STACK_UNAUTHORIZED_REQ
  INFO: occlientbasicops: SEQUENCE NUMBER: 16777216
  INFO: PayloadLog: NULL Payload
  INFO: occlientbasicops: =============> Get Response

I fixed it to:

  INFO: occlientbasicops: StackResult: OC_STACK_OK (...)
  INFO: PayloadLog: Payload Type: Representation (...)
  INFO: PayloadLog:     URI:/a/led (...)
  INFO: PayloadLog:             state(bool):false (...)

Extra note, it look like the parse function is never returning false.

Change-Id: Id3e48c8a04453e87a09e7636ead9a9f64c499d44
Bug: https://jira.iotivity.org/browse/IOT-2390
Origin: https://gerrit.iotivity.org/gerrit/#/c/23637/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit f6394a488449831c0c9070b652c79630d80767ba)
resource/csdk/stack/samples/linux/secure/common.cpp
resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp