diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-10 12:48:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-10 12:48:35 +0000 |
commit | 815a39088f8f33eece015c371cd4f3a9115f4cc8 (patch) | |
tree | c947348d98a7563ead2fb909a7d37cb251755004 /src | |
parent | 5add96019deec64775c8229e99dce6fa6d4f8728 (diff) | |
download | gnunet-815a39088f8f33eece015c371cd4f3a9115f4cc8.tar.gz gnunet-815a39088f8f33eece015c371cd4f3a9115f4cc8.zip |
cleaner
Diffstat (limited to 'src')
-rw-r--r-- | src/core/core.h | 10 | ||||
-rw-r--r-- | src/core/gnunet-service-core.h | 4 | ||||
-rw-r--r-- | src/core/gnunet-service-core_clients.c | 10 | ||||
-rw-r--r-- | src/core/gnunet-service-core_sessions.c | 5 |
4 files changed, 13 insertions, 16 deletions
diff --git a/src/core/core.h b/src/core/core.h index abbe9acc0..8c97f6177 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
@@ -23,7 +23,11 @@ | |||
23 | * @brief common internal definitions for core service | 23 | * @brief common internal definitions for core service |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #ifndef CORE_H | ||
27 | #define CORE_H | ||
28 | |||
26 | #include "gnunet_bandwidth_lib.h" | 29 | #include "gnunet_bandwidth_lib.h" |
30 | #include "gnunet_transport_service.h" | ||
27 | #include "gnunet_crypto_lib.h" | 31 | #include "gnunet_crypto_lib.h" |
28 | #include "gnunet_time_lib.h" | 32 | #include "gnunet_time_lib.h" |
29 | 33 | ||
@@ -33,11 +37,6 @@ | |||
33 | #define DEBUG_CORE GNUNET_EXTRA_LOGGING | 37 | #define DEBUG_CORE GNUNET_EXTRA_LOGGING |
34 | 38 | ||
35 | /** | 39 | /** |
36 | * Debugging interaction core-clients. | ||
37 | */ | ||
38 | #define DEBUG_CORE_CLIENT GNUNET_EXTRA_LOGGING | ||
39 | |||
40 | /** | ||
41 | * Definition of bits in the InitMessage's options field that specify | 40 | * Definition of bits in the InitMessage's options field that specify |
42 | * which events this client cares about. Note that inbound messages | 41 | * which events this client cares about. Note that inbound messages |
43 | * for handlers that were specifically registered are always | 42 | * for handlers that were specifically registered are always |
@@ -383,4 +382,5 @@ struct ConnectMessage | |||
383 | 382 | ||
384 | }; | 383 | }; |
385 | 384 | ||
385 | #endif | ||
386 | /* end of core.h */ | 386 | /* end of core.h */ |
diff --git a/src/core/gnunet-service-core.h b/src/core/gnunet-service-core.h index 2d5156efe..d4e43a457 100644 --- a/src/core/gnunet-service-core.h +++ b/src/core/gnunet-service-core.h | |||
@@ -27,9 +27,7 @@ | |||
27 | #define GNUNET_SERVICE_CORE_H | 27 | #define GNUNET_SERVICE_CORE_H |
28 | 28 | ||
29 | #include "gnunet_statistics_service.h" | 29 | #include "gnunet_statistics_service.h" |
30 | 30 | #include "core.h" | |
31 | |||
32 | #define DEBUG_CORE GNUNET_EXTRA_LOGGING | ||
33 | 31 | ||
34 | /** | 32 | /** |
35 | * Opaque handle to a client. | 33 | * Opaque handle to a client. |
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c index c9eb587b5..0b1616c97 100644 --- a/src/core/gnunet-service-core_clients.c +++ b/src/core/gnunet-service-core_clients.c | |||
@@ -141,7 +141,7 @@ send_to_client (struct GSC_Client *client, | |||
141 | const struct GNUNET_MessageHeader *msg, | 141 | const struct GNUNET_MessageHeader *msg, |
142 | int can_drop) | 142 | int can_drop) |
143 | { | 143 | { |
144 | #if DEBUG_CORE_CLIENT | 144 | #if DEBUG_CORE |
145 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 145 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
146 | "Preparing to send %u bytes of message of type %u to client.\n", | 146 | "Preparing to send %u bytes of message of type %u to client.\n", |
147 | (unsigned int) ntohs (msg->size), | 147 | (unsigned int) ntohs (msg->size), |
@@ -220,7 +220,7 @@ send_to_all_clients (const struct GNUNET_MessageHeader *msg, | |||
220 | ( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) && | 220 | ( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) && |
221 | (GNUNET_YES == type_match (type, c)) ) ) ) | 221 | (GNUNET_YES == type_match (type, c)) ) ) ) |
222 | continue; /* skip */ | 222 | continue; /* skip */ |
223 | #if DEBUG_CORE_CLIENT > 1 | 223 | #if DEBUG_CORE > 1 |
224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 224 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
225 | "Sending message of type %u to client.\n", | 225 | "Sending message of type %u to client.\n", |
226 | (unsigned int) ntohs (msg->type)); | 226 | (unsigned int) ntohs (msg->type)); |
@@ -280,7 +280,7 @@ handle_client_init (void *cls, struct GNUNET_SERVER_Client *client, | |||
280 | GNUNET_CONTAINER_DLL_insert (client_head, | 280 | GNUNET_CONTAINER_DLL_insert (client_head, |
281 | client_tail, | 281 | client_tail, |
282 | c); | 282 | c); |
283 | #if DEBUG_CORE_CLIENT | 283 | #if DEBUG_CORE |
284 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 284 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
285 | "Client connecting to core service is interested in %u message types\n", | 285 | "Client connecting to core service is interested in %u message types\n", |
286 | (unsigned int) c->tcnt); | 286 | (unsigned int) c->tcnt); |
@@ -504,7 +504,7 @@ handle_client_disconnect (void *cls, | |||
504 | 504 | ||
505 | if (client == NULL) | 505 | if (client == NULL) |
506 | return; | 506 | return; |
507 | #if DEBUG_CORE_CLIENT | 507 | #if DEBUG_CORE |
508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
509 | "Client %p has disconnected from core service.\n", client); | 509 | "Client %p has disconnected from core service.\n", client); |
510 | #endif | 510 | #endif |
@@ -619,7 +619,7 @@ GDS_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, | |||
619 | sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); | 619 | sizeof (struct GNUNET_TRANSPORT_ATS_Information) * atsi_count); |
620 | a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); | 620 | a[atsi_count].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); |
621 | a[atsi_count].value = htonl (0); | 621 | a[atsi_count].value = htonl (0); |
622 | #if DEBUG_CORE_CLIENT | 622 | #if DEBUG_CORE |
623 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 623 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
624 | "Sending `%s' message to client.\n", | 624 | "Sending `%s' message to client.\n", |
625 | "NOTIFY_CONNECT"); | 625 | "NOTIFY_CONNECT"); |
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index a1b40129c..5ea3210c7 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include "gnunet-service-core_clients.h" | 32 | #include "gnunet-service-core_clients.h" |
33 | #include "gnunet_constants.h" | 33 | #include "gnunet_constants.h" |
34 | 34 | ||
35 | |||
36 | /** | 35 | /** |
37 | * Message ready for encryption. This struct is followed by the | 36 | * Message ready for encryption. This struct is followed by the |
38 | * actual content of the message. | 37 | * actual content of the message. |
@@ -301,7 +300,7 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car) | |||
301 | /* neighbour must have disconnected since request was issued, | 300 | /* neighbour must have disconnected since request was issued, |
302 | * ignore (client will realize it once it processes the | 301 | * ignore (client will realize it once it processes the |
303 | * disconnect notification) */ | 302 | * disconnect notification) */ |
304 | #if DEBUG_CORE_CLIENT | 303 | #if DEBUG_CORE |
305 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 304 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
306 | "Dropped client request for transmission (am disconnected)\n"); | 305 | "Dropped client request for transmission (am disconnected)\n"); |
307 | #endif | 306 | #endif |
@@ -318,7 +317,7 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car) | |||
318 | GSC_CLIENTS_reject_request (car); | 317 | GSC_CLIENTS_reject_request (car); |
319 | return; | 318 | return; |
320 | } | 319 | } |
321 | #if DEBUG_CORE_CLIENT | 320 | #if DEBUG_CORE |
322 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 321 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
323 | "Received client transmission request. queueing\n"); | 322 | "Received client transmission request. queueing\n"); |
324 | #endif | 323 | #endif |