Resource directory related fixes.
authorTodd Malsbary <todd.malsbary@intel.com>
Mon, 21 Nov 2016 20:01:33 +0000 (12:01 -0800)
committerHabib Virji <habib.virji@samsung.com>
Tue, 7 Feb 2017 14:22:00 +0000 (14:22 +0000)
commit534200bc97abb740e8e11502a9b32c6f8b6af356
treeef3e7fb11b8d2258d61fbd9a47835bd9e2d4ac66
parent1c13401adfdabcc9de0a9bbd1e6eb2abf749faf6
Resource directory related fixes.

- Use the passed in ID in OCRDPublishWithDeviceId(),
- Set the size of the CBOR array to the length of the discovery
  payload list in OCConvertDiscoveryPayload(),
- Return all local and published resources in response to GET
  /oic/res,
- Set the di and baseURI correctly in discovery payloads,
- Only return resources that match the intersection of 'rt' and 'if'
  queries.
- Add missing calls to ROLLBACK in error paths.

Change-Id: Ib1ad770fec8ec6f9eafff0e5f864ee115f1ba5b5
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14581
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
resource/csdk/resource-directory/src/internal/rd_database.c
resource/csdk/resource-directory/unittests/rddatabase.cpp
resource/csdk/resource-directory/unittests/rdtests.cpp
resource/csdk/stack/include/ocstack.h
resource/csdk/stack/src/ocpayloadconvert.c
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/oicresourcedirectory.c