aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-02-01 17:38:19 +0000
committerBart Polot <bart@net.in.tum.de>2012-02-01 17:38:19 +0000
commit79657f3133fab3b64c004be3307a853dd1c4a630 (patch)
tree9165ae54c4d39befc086f9c3e086519161215570 /src/mesh
parent51ded2191d94c707434cc5e082c7053f9469f149 (diff)
downloadgnunet-79657f3133fab3b64c004be3307a853dd1c4a630.tar.gz
gnunet-79657f3133fab3b64c004be3307a853dd1c4a630.zip
- Define new debug statements
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh.c12
-rw-r--r--src/mesh/mesh_api.c4
2 files changed, 15 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 5abead314..744f5d2d2 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -73,7 +73,17 @@
73 73
74#define MESH_DEBUG_DHT GNUNET_NO 74#define MESH_DEBUG_DHT GNUNET_NO
75 75
76#if MESH_DEBUG
77#define DEBUG(...) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__)
78#else
79#define DEBUG(...)
80#endif
76 81
82#if MESH_DEBUG_DHT
83#define DEBUG_DHT(...) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__)
84#else
85#define DEBUG_DHT(...)
86#endif
77 87
78/******************************************************************************/ 88/******************************************************************************/
79/************************ DATA STRUCTURES ****************************/ 89/************************ DATA STRUCTURES ****************************/
@@ -477,7 +487,7 @@ mesh_debug (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
477 { 487 {
478 return; 488 return;
479 } 489 }
480 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: %s\n", s); 490 DEBUG ("MESH: %s\n", s);
481} 491}
482#endif 492#endif
483 493
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index 4b16b004b..170572f13 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -47,7 +47,11 @@ extern "C"
47 47
48#define MESH_API_DEBUG GNUNET_YES 48#define MESH_API_DEBUG GNUNET_YES
49 49
50#if MESH_API_DEBUG
50#define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__) 51#define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__)
52#else
53#define LOG(kind,...)
54#endif
51 55
52/******************************************************************************/ 56/******************************************************************************/
53/************************ DATA STRUCTURES ****************************/ 57/************************ DATA STRUCTURES ****************************/