Skip to content

Commit

Permalink
Merge pull request #6 from sbernard31/writeinstance
Browse files Browse the repository at this point in the history
allow write tlv instance + bug fix
  • Loading branch information
jvermillard committed Aug 1, 2014
2 parents 63afa72 + 59c9915 commit 0ffdf3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/management.c
Expand Up @@ -124,7 +124,7 @@ coap_status_t handle_dm_request(lwm2m_context_t * contextP,
break;
case COAP_PUT:
{
if (LWM2M_URI_IS_SET_INSTANCE(uriP) && LWM2M_URI_IS_SET_RESOURCE(uriP))
if (LWM2M_URI_IS_SET_INSTANCE(uriP))
{
result = object_write(contextP, uriP, message->payload, message->payload_len);
}
Expand Down
2 changes: 1 addition & 1 deletion core/objects.c
Expand Up @@ -238,7 +238,7 @@ coap_status_t object_write(lwm2m_context_t * contextP,
else
{
size = lwm2m_tlv_parse(buffer, length, &tlvP);
if (size = 0) return COAP_500_INTERNAL_SERVER_ERROR;
if (size == 0) return COAP_500_INTERNAL_SERVER_ERROR;
}
result = targetP->writeFunc(uriP->instanceId, size, tlvP, targetP);
lwm2m_tlv_free(size, tlvP);
Expand Down

0 comments on commit 0ffdf3f

Please sign in to comment.