Skip to content
Permalink
Browse files

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>
  • Loading branch information...
mike-scott authored and nashif committed Aug 27, 2018
1 parent 881fae3 commit a166ba77c4f001f54cf9f7b739003d280bc2f37f
Showing with 3 additions and 0 deletions.
  1. +3 −0 subsys/net/lib/lwm2m/lwm2m_engine.c
@@ -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 */

0 comments on commit a166ba7

Please sign in to comment.
You can’t perform that action at this time.