Fix runtime error of ThingsManager API.
Some API and examples show runtime errors.
So we fixed runtime errors and issues.
Fix [IOT-324], [IOT-326], [IOT-336], [IOT-337]
Change-Id: I0f71b3a2243e4856203140aae71db473f4fa32ad
Signed-off-by: HyunJun Kim <hyunjun2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/330
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit
24b19311190ac247aee64809064f63c5c796384a)
Reviewed-on: https://gerrit.iotivity.org/gerrit/389
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>