net: lwm2m: return observe errors immediately
Instead of continuing to do_read_op(), let's handle errors during observe processing immediately. Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
parent
881fae33a9
commit
a166ba77c4
1 changed files with 3 additions and 0 deletions
|
@ -3329,9 +3329,12 @@ static int handle_request(struct coap_packet *request,
|
|||
accept);
|
||||
if (r < 0) {
|
||||
SYS_LOG_ERR("add OBSERVE error: %d", r);
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
SYS_LOG_ERR("OBSERVE request missing token");
|
||||
r = -EINVAL;
|
||||
goto error;
|
||||
}
|
||||
} else if (observe == 1) {
|
||||
/* remove observer */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue