Commit c3e52ee3 authored by Kishen Maloor's avatar Kishen Maloor

Merge branch 'origin/master' into fargo

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parents 4e651c81 672a1e88
Pipeline #251 passed with stage
in 49 seconds
......@@ -45,7 +45,7 @@ static oc_device_info_t oc_device_info[OC_MAX_NUM_DEVICES];
#endif /* !OC_DYNAMIC_ALLOCATION */
static oc_platform_info_t oc_platform_info;
static bool announce_con_res = true;
static bool announce_con_res = false;
static size_t device_count = 0;
/* Although used several times in the OCF spec, "/oic/con" is not
......@@ -323,9 +323,7 @@ oc_core_add_new_device(const char *uri, const char *rt, const char *name,
OC_DISCOVERABLE, oc_core_device_handler, 0, 0, 0, 2, rt, "oic.wk.d");
}
#ifndef OC_SECURITY
oc_gen_uuid(&oc_device_info[device_count].piid);
#endif /* !OC_SECURITY */
oc_new_string(&oc_device_info[device_count].name, name, strlen(name));
oc_new_string(&oc_device_info[device_count].icv, spec_version,
......
......@@ -1159,6 +1159,13 @@ notify_client_cb_503(oc_client_cb_t *cb)
oc_response_handler_t handler = (oc_response_handler_t)cb->handler.response;
handler(&client_response);
#ifdef OC_TCP
if ((oc_string_len(cb->uri) == 5 &&
memcmp((const char *)oc_string(cb->uri), "/ping", 5) == 0)) {
oc_ri_remove_timed_event_callback(cb, oc_remove_ping_handler);
}
#endif /* OC_TCP */
free_client_cb(cb);
}
......
......@@ -90,6 +90,9 @@ oc_set_immutable_device_identifier(size_t device, oc_uuid_t *piid)
if (piid && device < oc_core_get_num_devices()) {
oc_device_info_t *info = oc_core_get_device_info(device);
if (info) {
#ifdef OC_SECURITY
oc_sec_load_unique_ids(device);
#endif /* OC_SECURITY */
memcpy(info->piid.id, piid->id, sizeof(oc_uuid_t));
#ifdef OC_SECURITY
oc_sec_dump_unique_ids(device);
......
......@@ -522,7 +522,10 @@ oc_sec_load_unique_ids(size_t device)
}
}
oc_free_rep(p);
} else {
oc_sec_dump_unique_ids(device);
}
#ifdef OC_DYNAMIC_ALLOCATION
free(buf);
#endif /* OC_DYNAMIC_ALLOCATION */
......
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