From ec7ac82219f20640f27a908aee41d4ff3a57f400 Mon Sep 17 00:00:00 2001
From: winckel <winckel@eurecom.fr>
Date: Thu, 12 Dec 2013 09:48:27 +0000
Subject: [PATCH] Completed LOG_DUMP.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4685 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h b/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h
index 218b39d8d9..07b67ea096 100644
--- a/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h
+++ b/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h
@@ -89,7 +89,14 @@ do {                                                            \
     }                                                           \
 } while (0)
 
-# define LOG_DUMP(a, b) LOG_D(NAS, " Dump %d\n", b)
+# define LOG_DUMP(dATA, lEN)                                                    \
+do {                                                                            \
+    char buffer[3*lEN + 1];                                                     \
+    int i;                                                                      \
+    for (i = 0; i < lEN; i++)                                                   \
+        sprintf (&buffer[3*i], "%02x ", dATA[i]);                               \
+    LOG_D(NAS, " Dump %d: %s\n", lEN, buffer);                                  \
+} while (0)
 
 # define LOG_FUNC_IN                                                            \
 do {                                                                            \
-- 
GitLab