(regroup coap_handle_message code to have pdu handling in one place)

This commit is contained in:
chrysn committed 2015-01-16 09:19:58 +01:00
1 parent 8a41533a87
commit 00beb7f1f7
1 file changed
+5 -5
+5 -5
View File
@@ -869,16 +869,16 @@ coap_handle_message(coap_context_t *ctx,
goto error;
}
coap_ticks(&node->t);
coap_packet_populate_endpoint(packet, &node->local_if);
coap_packet_copy_source(packet, &node->remote);
if (!coap_pdu_parse(msg, msg_len, node->pdu)) {
warn("discard malformed PDU");
goto error;
}
coap_ticks(&node->t);
coap_packet_populate_endpoint(packet, &node->local_if);
coap_packet_copy_source(packet, &node->remote);
/* and add new node to receive queue */
coap_transaction_id(&node->remote, node->pdu, &node->id);