mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-11 19:30:40 +03:00
net.c: Log correct address in coap_read_session()
Move the coap_log() entry to after updating the session information. Seen when coap-client is doing multicast request sends
This commit is contained in:
1 parent
bee3bb2862
commit
ddf8691b8d
1 file changed
+2
-2
@@ -1147,11 +1147,11 @@ coap_read_session(coap_context_t *ctx, coap_session_t *session, coap_tick_t now)
|
||||
coap_log(LOG_WARNING, "* %s: read error\n",
|
||||
coap_session_str(session));
|
||||
} else if (bytes_read > 0) {
|
||||
coap_log(LOG_DEBUG, "* %s: received %zd bytes\n",
|
||||
coap_session_str(session), bytes_read);
|
||||
session->last_rx_tx = now;
|
||||
memcpy(&session->addr_info, &packet->addr_info,
|
||||
sizeof(session->addr_info));
|
||||
coap_log(LOG_DEBUG, "* %s: received %zd bytes\n",
|
||||
coap_session_str(session), bytes_read);
|
||||
coap_handle_dgram_for_proto(ctx, session, packet);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user