Commit ba3db707 authored by Kishen Maloor's avatar Kishen Maloor

oc_collection:srvrs bind to oic.if.create if used

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
Change-Id: I595c61059cdbdfaf1847bea6d6d21fbb47fe3a39
parent 0b100dc5
......@@ -208,9 +208,6 @@ oc_new_collection(const char *name, const char *uri, uint8_t num_resource_types,
oc_collection_t *collection = oc_collection_alloc();
if (collection) {
collection->interfaces = OC_IF_BASELINE | OC_IF_LL | OC_IF_B;
#ifdef OC_COLLECTIONS_IF_CREATE
collection->interfaces |= OC_IF_CREATE;
#endif /* OC_COLLECTIONS_IF_CREATE */
collection->default_interface = OC_IF_LL;
oc_populate_resource_object((oc_resource_t *)collection, name, uri,
num_resource_types, device);
......
......@@ -530,6 +530,7 @@ register_resources(void)
oc_collection_add_mandatory_rt(col, "oic.r.switch.binary");
#ifdef OC_COLLECTIONS_IF_CREATE
oc_resource_bind_resource_interface(col, OC_IF_CREATE);
oc_collections_add_rt_factory("oic.r.switch.binary", get_switch_instance,
free_switch_instance);
#endif /* OC_COLLECTIONS_IF_CREATE */
......
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