Allow empty array in OCRepPayloadSetIntArray
[IOT-2458] OCRepPayloadSetIntArray() did not allow empty array. Fixed by not returning false when dimTotal is 0 and instead letting the function to get executed when input array is NULL & dimTotal is 0. Also fixed the usage of API in easy setup enrollee code. Now using OCRepPayloadSetIntArrayAsOwner() instead of OCRepPayloadSetIntArray() as the later duplicates the memory which can be avoided "by giving payload ownership to stack". Added unit test in cbortests to test new API behavior. Change-Id: If5352b1faf5a9355dd0f8a22882a6af545df6d29 Signed-off-by:Abhishek Pandey <abhi.siso@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/21591Tested-by:
jenkins-iotivity <jenkins@iotivity.org> Reviewed-by:
Uze Choi <uzchoi@samsung.com> Reviewed-by:
Todd Malsbary <todd.malsbary@intel.com> Reviewed-by:
Harish Marappa <h.marappa@samsung.com> Reviewed-by:
Ashok Babu Channa <ashok.channa@samsung.com>
Showing
Please register or sign in to comment