net: lwm2m: support for reading OPAQUE resources with OMA TLV
The LwM2M stack would previously ignore all OPAQUE resources when reading them. This meant that it was impossible to read them, even if there was a custom read callback. Signed-off-by: Göran Weinholt <goran.weinholt@endian.se>
This commit is contained in:
parent
bd639fc332
commit
32864ecbcc
2 changed files with 11 additions and 1 deletions
|
@ -2106,8 +2106,10 @@ static int lwm2m_read_handler(struct lwm2m_engine_obj_inst *obj_inst,
|
|||
|
||||
switch (obj_field->data_type) {
|
||||
|
||||
/* do nothing for OPAQUE (probably has a callback) */
|
||||
case LWM2M_RES_TYPE_OPAQUE:
|
||||
engine_put_opaque(&msg->out, &msg->path,
|
||||
(u8_t *)data_ptr,
|
||||
data_len);
|
||||
break;
|
||||
|
||||
case LWM2M_RES_TYPE_STRING:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue