net: lwm2m: fix CREATED response code
Handle LwM2M CREATE op correctly and remove comments. Signed-off-by: Michael Scott <michael.scott@linaro.org>
This commit is contained in:
parent
eb5ba43644
commit
1d05ba75d1
2 changed files with 2 additions and 4 deletions
|
@ -2448,10 +2448,11 @@ static int handle_request(struct coap_packet *request,
|
|||
if (path.level < 2) {
|
||||
/* write/create a object instance */
|
||||
context.operation = LWM2M_OP_CREATE;
|
||||
msg->code = COAP_RESPONSE_CODE_CREATED;
|
||||
} else {
|
||||
context.operation = LWM2M_OP_EXECUTE;
|
||||
msg->code = COAP_RESPONSE_CODE_CHANGED;
|
||||
}
|
||||
msg->code = COAP_RESPONSE_CODE_CHANGED;
|
||||
break;
|
||||
|
||||
case COAP_METHOD_PUT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue