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:
Michael Scott 2017-10-11 13:44:35 -07:00 committed by Jukka Rissanen
commit 1d05ba75d1
2 changed files with 2 additions and 4 deletions

View file

@ -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: