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>
Fri, 18 Mar 2016 07:59:59 +0000 (07:59 +0000)
commit6493723651bbff959443709767123942ecc2d8a4
treec5ecbf2c781a2bceaa361270d3133f30d9965d90
parentea119a507d8564c9ab242168196a524cfc0434fd
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>
(cherry picked from commit 613c5281e662dd8f693477fa001f9f5500fa8f2f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/4521
resource/csdk/stack/include/octypes.h
resource/src/OCResource.cpp