net: lwm2m: break the opaque write loop early when fail
As title, check the return value from the write callback and break if an error is returned Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
This commit is contained in:
parent
5876baa3be
commit
a37f049e6d
1 changed files with 3 additions and 0 deletions
|
@ -1903,6 +1903,9 @@ static int lwm2m_write_handler_opaque(struct lwm2m_engine_obj_inst *obj_inst,
|
||||||
data_ptr, len,
|
data_ptr, len,
|
||||||
last_pkt_block && last_block,
|
last_pkt_block && last_block,
|
||||||
total_size);
|
total_size);
|
||||||
|
if (ret < 0) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue