Fixed issue with HeaderOptions not correctly being sent
If HeaderOptions count was greater than 1, the sender side did not correctly
allocate and copy the memory for it, resulting in the second headeroption being
an invalid read/copy, thus resulting in garbage data in the second HeaderOption.
This fix ensures that ALL header option data is correctly copied. Validation
shows that the rst of the stack is working properly, so the correct data will
be transferred.
Change-Id: I08d9ccf8943bf7e85f6d24055b5f11881ba2bd24
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/153
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Tested-by: Ashok Babu Channa <ashok.channa@samsung.com>