From: Bart Polot Date: Wed, 1 Feb 2012 17:38:19 +0000 (+0000) Subject: - Define new debug statements X-Git-Tag: initial-import-from-subversion-38251~14951 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=79657f3133fab3b64c004be3307a853dd1c4a630;p=oweals%2Fgnunet.git - Define new debug statements --- 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 @@ #define MESH_DEBUG_DHT GNUNET_NO +#if MESH_DEBUG +#define DEBUG(...) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__) +#else +#define DEBUG(...) +#endif +#if MESH_DEBUG_DHT +#define DEBUG_DHT(...) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__) +#else +#define DEBUG_DHT(...) +#endif /******************************************************************************/ /************************ DATA STRUCTURES ****************************/ @@ -477,7 +487,7 @@ mesh_debug (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { return; } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: %s\n", s); + DEBUG ("MESH: %s\n", s); } #endif 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" #define MESH_API_DEBUG GNUNET_YES +#if MESH_API_DEBUG #define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__) +#else +#define LOG(kind,...) +#endif /******************************************************************************/ /************************ DATA STRUCTURES ****************************/