Fix the bug in UUID convertor.
Previous ConvertStrToUuid() API does not guarantee correct result in case of empty UUID.
Even if input string is empty string,the input string may contain the garbage except first byte.
Here is bad case for ConvertStrToUuid() API :
Input : b'00 00 00 00 00 00 00 00 00 00 CC CC FF FF FF FF'
Since first byte is NULL character, the input string is empty string exactly.
The expected result is "
00000000-0000-0000-0000-
000000000000" in case of empty string.
But current ConvertStrToUuid() will be generated "
00000000-0000-0000-0000-
CCCCFFFFFFFF" for above input.
This patch is intended to fix it.
[Patch #1] Initial upload
[Patch #2] Update commit message
[Patch #3] Update according to comments.
[Patch #4] Update log message.
[Patch #5] Fix the typo on log message according to review comment.
Change-Id: I97c95a8fea30ffdf7e4c4ff6622e083b8357705a
Signed-off-by: leechul <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7431
Reviewed-by: Kyungsun Cho <goodsun.cho@samsung.com>
Reviewed-by: Yonggoo Kang <ygace.kang@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>