Commit 01964cbc authored by Kishen Maloor's avatar Kishen Maloor

Merge branch 'origin/hollywood' into ipanema

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parents f141f24e 960652c5
Pipeline #1045 passed with stage
in 12 minutes and 32 seconds
......@@ -584,23 +584,27 @@ oc_handle_collection_request(oc_method_t method, oc_request_t *request,
oc_rep_start_root_object();
oc_process_baseline_interface(request->resource);
/* rts */
oc_rep_open_array(root, rts);
oc_rt_t *rtt = (oc_rt_t *)oc_list_head(collection->supported_rts);
while (rtt) {
oc_rep_add_text_string(rts, oc_string(rtt->rt));
rtt = rtt->next;
if (oc_list_length(collection->supported_rts) > 0) {
oc_rep_open_array(root, rts);
oc_rt_t *rtt = (oc_rt_t *)oc_list_head(collection->supported_rts);
while (rtt) {
oc_rep_add_text_string(rts, oc_string(rtt->rt));
rtt = rtt->next;
}
oc_rep_close_array(root, rts);
}
oc_rep_close_array(root, rts);
/* rts-m */
const char *rtsm_key = "rts-m";
oc_rep_set_key(oc_rep_object(root), rtsm_key);
oc_rep_start_array(oc_rep_object(root), rtsm);
oc_rt_t *rtt = (oc_rt_t *)oc_list_head(collection->mandatory_rts);
while (rtt) {
oc_rep_add_text_string(rtsm, oc_string(rtt->rt));
rtt = rtt->next;
if (oc_list_length(collection->mandatory_rts) > 0) {
const char *rtsm_key = "rts-m";
oc_rep_set_key(oc_rep_object(root), rtsm_key);
oc_rep_start_array(oc_rep_object(root), rtsm);
oc_rt_t *rtt = (oc_rt_t *)oc_list_head(collection->mandatory_rts);
while (rtt) {
oc_rep_add_text_string(rtsm, oc_string(rtt->rt));
rtt = rtt->next;
}
oc_rep_end_array(oc_rep_object(root), rtsm);
}
oc_rep_end_array(oc_rep_object(root), rtsm);
oc_rep_set_array(root, links);
while (link != NULL) {
if (oc_filter_resource_by_rt(link->resource, request)) {
......
......@@ -67,7 +67,7 @@ oc_sec_create_svr(void)
OCF_SEC_SP, i, "/oic/sec/sp", OC_IF_RW | OC_IF_BASELINE, OC_IF_BASELINE,
OC_DISCOVERABLE | OC_SECURE, get_sp, 0, post_sp, 0, 1, "oic.r.sp");
oc_core_populate_resource(
OCF_SEC_SDI, i, "/oic/sec/sdi", OC_IF_BASELINE | OC_IF_RW, OC_IF_BASELINE,
OCF_SEC_SDI, i, "/oic/sec/sdi", OC_IF_BASELINE | OC_IF_RW, OC_IF_RW,
OC_DISCOVERABLE, get_sdi, 0, post_sdi, 0, 1, "oic.r.sdi");
#ifdef OC_PKI
oc_core_populate_resource(
......
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