net: lwm2m: makes CBOR as one of the default...
...content formats In case that SenML CBOR or SenML JSON are both disabled there is need to use plain CBOR as backup. Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
This commit is contained in:
parent
11b8b4e7ba
commit
cfcc891d3d
1 changed files with 4 additions and 1 deletions
|
@ -4453,8 +4453,11 @@ static int lwm2m_engine_default_content_format(uint16_t *accept_format)
|
||||||
if (IS_ENABLED(CONFIG_LWM2M_RW_SENML_JSON_SUPPORT)) {
|
if (IS_ENABLED(CONFIG_LWM2M_RW_SENML_JSON_SUPPORT)) {
|
||||||
LOG_DBG("No accept option given. Assume SenML Json.");
|
LOG_DBG("No accept option given. Assume SenML Json.");
|
||||||
*accept_format = LWM2M_FORMAT_APP_SEML_JSON;
|
*accept_format = LWM2M_FORMAT_APP_SEML_JSON;
|
||||||
|
} else if (IS_ENABLED(CONFIG_LWM2M_RW_CBOR_SUPPORT)) {
|
||||||
|
LOG_DBG("No accept option given. Assume CBOR.");
|
||||||
|
*accept_format = LWM2M_FORMAT_APP_CBOR;
|
||||||
} else {
|
} else {
|
||||||
LOG_ERR("SenML CBOR or JSON is not supported");
|
LOG_ERR("CBOR, SenML CBOR or SenML JSON is not supported");
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
} else if (IS_ENABLED(CONFIG_LWM2M_RW_OMA_TLV_SUPPORT)) {
|
} else if (IS_ENABLED(CONFIG_LWM2M_RW_OMA_TLV_SUPPORT)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue