From 46467a7dd8bae4c3b17519eeee01f2fc80fe3a6b Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Wed, 22 Feb 2017 14:56:07 -0800 Subject: [PATCH] Log message ID in host byte order Both libcoap and CTT use the host byte order, so this change helps correlate their log contents with the IoTivity logs. Change-Id: If8b91a35017329a1a2a5bbe2770c71122c2f382a Signed-off-by: Dan Mihai Reviewed-on: https://gerrit.iotivity.org/gerrit/17455 Reviewed-by: Mike Fenelon Tested-by: Mike Fenelon --- resource/csdk/connectivity/src/camessagehandler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource/csdk/connectivity/src/camessagehandler.c b/resource/csdk/connectivity/src/camessagehandler.c index 68966d7..32b57e0 100644 --- a/resource/csdk/connectivity/src/camessagehandler.c +++ b/resource/csdk/connectivity/src/camessagehandler.c @@ -1440,7 +1440,8 @@ static void CALogPDUInfo(const CAData_t *data, const coap_pdu_t *pdu) if (pdu->transport_hdr) { - OIC_LOG_V(DEBUG, ANALYZER_TAG, "Msg ID = [%d]", pdu->transport_hdr->udp.id); + OIC_LOG_V(DEBUG, ANALYZER_TAG, "Msg ID = [%u]", + (uint32_t)ntohs(pdu->transport_hdr->udp.id)); } if (info) -- 2.7.4