resource: Fix occlientbasicops to support coaps 39/23639/2
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>
Thu, 7 Dec 2017 20:22:56 +0000 (20:22 +0000)
commitf6394a488449831c0c9070b652c79630d80767ba
treea14941361dffa9efb3e70e23932e4cdd700e0312
parent83a52aba61025dae67acdd849b19b2b9944cdefd
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>
resource/csdk/stack/samples/linux/secure/common.cpp
resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp