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 ...@@ -94,15 +94,14 @@ static int
app_init(void) app_init(void)
{ {
int ret = oc_init_platform(manufacturer, NULL, NULL); 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); data_model_version, NULL, NULL);
if (!d) { if (ret || !deviceid) {
return 1; return ret;
} }
if (deviceid == NULL) {
return 0; oc_device_info_t *info = oc_core_get_device_info(0);
} oc_str_to_uuid(deviceid, &info->di);
oc_str_to_uuid(deviceid, &d->di);
return ret; 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