Commit 022dfafa authored by Jozef Kralik's avatar Jozef Kralik Committed by Kishen Maloor

set deviceID via oc_core_get_device_info

parent 49660e4a
......@@ -94,15 +94,14 @@ static int
int ret = oc_init_platform(manufacturer, NULL, NULL);
oc_device_info_t* d = oc_core_add_new_device("/oic/d", device_rt, device_name, spec_version,
ret |= oc_add_device("/oic/d", device_rt, device_name, spec_version,
data_model_version, NULL, NULL);
if (!d) {
return 1;
if (deviceid == NULL) {
return 0;
if (ret || !deviceid) {
return ret;
oc_str_to_uuid(deviceid, &d->di);
oc_device_info_t *info = oc_core_get_device_info(0);
oc_str_to_uuid(deviceid, &info->di);
return ret;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment