cleaner
authorChristian Grothoff <christian@grothoff.org>
Mon, 10 Oct 2011 12:48:35 +0000 (12:48 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 10 Oct 2011 12:48:35 +0000 (12:48 +0000)
src/core/core.h
src/core/gnunet-service-core.h
src/core/gnunet-service-core_clients.c
src/core/gnunet-service-core_sessions.c

index abbe9acc097a6a19a41268bb20dd9952c2c3fe34..8c97f6177ed6897e7f41479119069ba888118d2d 100644 (file)
  * @brief common internal definitions for core service
  * @author Christian Grothoff
  */
+#ifndef CORE_H
+#define CORE_H
+
 #include "gnunet_bandwidth_lib.h"
+#include "gnunet_transport_service.h"
 #include "gnunet_crypto_lib.h"
 #include "gnunet_time_lib.h"
 
  */
 #define DEBUG_CORE GNUNET_EXTRA_LOGGING
 
-/**
- * Debugging interaction core-clients.
- */
-#define DEBUG_CORE_CLIENT GNUNET_EXTRA_LOGGING
-
 /**
  * Definition of bits in the InitMessage's options field that specify
  * which events this client cares about.  Note that inbound messages
@@ -383,4 +382,5 @@ struct ConnectMessage
 
 };
 
+#endif
 /* end of core.h */
index 2d5156efec14a24916a7635f54997ef4675f794f..d4e43a457b8052c3278251a0d391d7bb340649a9 100644 (file)
@@ -27,9 +27,7 @@
 #define GNUNET_SERVICE_CORE_H
 
 #include "gnunet_statistics_service.h"
-
-
-#define DEBUG_CORE GNUNET_EXTRA_LOGGING
+#include "core.h"
 
 /**
  * Opaque handle to a client.
index c9eb587b550c6e48622c37a9e5d6cfed28c8ddb8..0b1616c9795455c62a5affffe5babafa9bc8e47f 100644 (file)
@@ -141,7 +141,7 @@ send_to_client (struct GSC_Client *client,
                const struct GNUNET_MessageHeader *msg,
                 int can_drop)
 {
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Preparing to send %u bytes of message of type %u to client.\n",
               (unsigned int) ntohs (msg->size),
@@ -220,7 +220,7 @@ send_to_all_clients (const struct GNUNET_MessageHeader *msg,
            ( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) &&
              (GNUNET_YES == type_match (type, c)) ) ) )
       continue; /* skip */
-#if DEBUG_CORE_CLIENT > 1
+#if DEBUG_CORE > 1
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                "Sending message of type %u to client.\n",
                (unsigned int) ntohs (msg->type));
@@ -280,7 +280,7 @@ handle_client_init (void *cls, struct GNUNET_SERVER_Client *client,
   GNUNET_CONTAINER_DLL_insert (client_head,
                               client_tail,
                               c);
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Client connecting to core service is interested in %u message types\n", 
               (unsigned int) c->tcnt);
@@ -504,7 +504,7 @@ handle_client_disconnect (void *cls,
 
   if (client == NULL)
     return;
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Client %p has disconnected from core service.\n", client);
 #endif
@@ -619,7 +619,7 @@ GDS_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
            sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count);
     a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
     a[atsi_count].value = htonl (0);
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
                "Sending `%s' message to client.\n",
                 "NOTIFY_CONNECT");
index a1b40129c875adf7af7f39b1b1379ff7c7ec6956..5ea3210c7be02bad35bf8f532f29c5b5903aa3b4 100644 (file)
@@ -32,7 +32,6 @@
 #include "gnunet-service-core_clients.h"
 #include "gnunet_constants.h"
 
-
 /**
  * Message ready for encryption.  This struct is followed by the
  * actual content of the message.
@@ -301,7 +300,7 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car)
     /* neighbour must have disconnected since request was issued,
      * ignore (client will realize it once it processes the
      * disconnect notification) */
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Dropped client request for transmission (am disconnected)\n");
 #endif
@@ -318,7 +317,7 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car)
     GSC_CLIENTS_reject_request (car);
     return;
   }
-#if DEBUG_CORE_CLIENT
+#if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received client transmission request. queueing\n");
 #endif