Log message ID in host byte order
authorDan Mihai <Daniel.Mihai@microsoft.com>
Wed, 22 Feb 2017 22:56:07 +0000 (14:56 -0800)
committerMike Fenelon <mike.fenelon@microsoft.com>
Mon, 6 Mar 2017 17:58:48 +0000 (17:58 +0000)
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 <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17455
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Tested-by: Mike Fenelon <mike.fenelon@microsoft.com>
resource/csdk/connectivity/src/camessagehandler.c

index 68966d7..32b57e0 100644 (file)
@@ -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)