mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
message id: Report everywhere the hex value for consistency
coap_show_pdu() reports the Message ID (mid) as a hex value prefixes by i:. Elsewhere it is reported as an integer or unsigned making those entries difficult to match up with the reported PDU. examples/coap-rd.c: examples/etsi_iot_01.c: src/async.c: src/coap_session.c: src/net.c: Replace tid=%d, message %d and transaction %d with mid=0x%x for clarity.
This commit is contained in:
1 parent
475654021e
commit
2e6cb55a50
5 files changed
+23
-23
No files matched your search
+2
-2
@@ -208,7 +208,7 @@ hnd_put_resource(coap_context_t *ctx UNUSED_PARAM,
|
||||
response = coap_pdu_init(type, code, request->hdr->id, size);
|
||||
|
||||
if (!response) {
|
||||
coap_log(LOG_DEBUG, "cannot create response for message %d\n",
|
||||
coap_log(LOG_DEBUG, "cannot create response for mid=0x%x\n",
|
||||
request->hdr->id);
|
||||
return;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ hnd_put_resource(coap_context_t *ctx UNUSED_PARAM,
|
||||
coap_add_token(response, request->hdr->token_length, request->hdr->token);
|
||||
|
||||
if (coap_send(ctx, peer, response) == COAP_INVALID_TID) {
|
||||
coap_log(LOG_DEBUG, "hnd_get_rd: cannot send response for message %d\n",
|
||||
coap_log(LOG_DEBUG, "hnd_get_rd: cannot send response for mid=0x%x\n",
|
||||
request->hdr->id);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -454,7 +454,7 @@ check_async(coap_context_t *ctx,
|
||||
coap_add_data(response, 4, (const uint8_t *)"done");
|
||||
|
||||
if (coap_send(async->session, response) == COAP_INVALID_TID) {
|
||||
coap_log(LOG_DEBUG, "check_async: cannot send response for message %d\n",
|
||||
coap_log(LOG_DEBUG, "check_async: cannot send response for mid=0x%x\n",
|
||||
response->tid);
|
||||
}
|
||||
coap_remove_async(ctx, async->session, async->id, &tmp);
|
||||
|
||||
Reference in new issue
Block a user