mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-23 23:51:03 +03:00
(regroup coap_handle_message code to have pdu handling in one place)
This commit is contained in:
1 parent
8a41533a87
commit
00beb7f1f7
1 file changed
+5
-5
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user