MAC address parsing in constructResourceObject()
authorjw0213.jung <jw0213.jung@samsung.com>
Fri, 11 Dec 2015 06:58:35 +0000 (15:58 +0900)
committerJon A. Cruz <jon@joncruz.org>
Thu, 17 Mar 2016 08:27:31 +0000 (08:27 +0000)
commit613c5281e662dd8f693477fa001f9f5500fa8f2f
treeb2c2c63ea0f20351b0e534ab86eadc9f24b418c4
parentdf3779aa30c5b105c7ab50799748b9770ea6cea7
MAC address parsing in constructResourceObject()

When call the function constructResourceObject(..), the first parameter
is a string for a host address of the server.
The string could be a IPv4 form or IPv6 or MAC.
But there is no parsing logic for MAC address form(xx:xx:xx:xx:xx:xx).
Without this, MAC is parsed as IPv4 which does not work properly.
(the first block as IP address, the second one is port number, and
lasts are ignored)
So I added the MAC parsing logic with checking a validity of address.

Change-Id: I2fc5a14b400605c9255173bbddc2ff7a4bae0551
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5593
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/stack/include/octypes.h
resource/src/OCResource.cpp