From 45cb6dbbdd3a509e54f94eff3b4f96ed3734b7c9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 2 Apr 2012 13:48:08 +0000 Subject: -removing legacy ifdefs --- src/peerinfo/gnunet-service-peerinfo.c | 8 -------- src/peerinfo/peerinfo.h | 1 - src/peerinfo/peerinfo_api.c | 17 ----------------- src/peerinfo/peerinfo_api_notify.c | 2 -- 4 files changed, 28 deletions(-) diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index 2a5921b5d..2dbdc9f83 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c @@ -534,10 +534,8 @@ handle_hello (void *cls, struct GNUNET_SERVER_Client *client, GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } -#if DEBUG_PEERINFO GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' message received for peer `%4s'\n", "HELLO", GNUNET_i2s (&pid)); -#endif bind_address (&pid, hello); GNUNET_SERVER_receive_done (client, GNUNET_OK); } @@ -559,10 +557,8 @@ handle_get (void *cls, struct GNUNET_SERVER_Client *client, lpm = (const struct ListPeerMessage *) message; GNUNET_break (0 == ntohl (lpm->reserved)); -#if DEBUG_PEERINFO GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' message received for peer `%4s'\n", "GET", GNUNET_i2s (&lpm->peer)); -#endif tc = GNUNET_SERVER_transmit_context_create (client); GNUNET_CONTAINER_multihashmap_get_multiple (hostmap, &lpm->peer.hashPubKey, &add_to_tc, tc); @@ -585,9 +581,7 @@ handle_get_all (void *cls, struct GNUNET_SERVER_Client *client, { struct GNUNET_SERVER_TransmitContext *tc; -#if DEBUG_PEERINFO GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' message received\n", "GET_ALL"); -#endif tc = GNUNET_SERVER_transmit_context_create (client); GNUNET_CONTAINER_multihashmap_iterate (hostmap, &add_to_tc, tc); GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0, @@ -625,9 +619,7 @@ static void handle_notify (void *cls, struct GNUNET_SERVER_Client *client, const struct GNUNET_MessageHeader *message) { -#if DEBUG_PEERINFO GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' message received\n", "NOTIFY"); -#endif GNUNET_SERVER_notification_context_add (notify_list, client); GNUNET_CONTAINER_multihashmap_iterate (hostmap, &do_notify_entry, client); GNUNET_SERVER_receive_done (client, GNUNET_OK); diff --git a/src/peerinfo/peerinfo.h b/src/peerinfo/peerinfo.h index bf5677477..919645e17 100644 --- a/src/peerinfo/peerinfo.h +++ b/src/peerinfo/peerinfo.h @@ -27,7 +27,6 @@ #include "gnunet_time_lib.h" #include "gnunet_peerinfo_service.h" -#define DEBUG_PEERINFO GNUNET_EXTRA_LOGGING GNUNET_NETWORK_STRUCT_BEGIN diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index 124d55e42..fed577035 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c @@ -274,10 +274,8 @@ do_transmit (void *cls, size_t size, void *buf) return 0; if (buf == NULL) { -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, _("Failed to transmit message to `%s' service.\n"), "PEERINFO"); -#endif GNUNET_CONTAINER_DLL_remove (h->tq_head, h->tq_tail, tqe); reconnect (h); if (tqe->cont != NULL) @@ -288,10 +286,8 @@ do_transmit (void *cls, size_t size, void *buf) ret = tqe->size; GNUNET_assert (size >= ret); memcpy (buf, &tqe[1], ret); -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting request of size %u to `%s' service.\n", ret, "PEERINFO"); -#endif GNUNET_CONTAINER_DLL_remove (h->tq_head, h->tq_tail, tqe); if (tqe->cont != NULL) tqe->cont (tqe->cont_cls, GNUNET_OK); @@ -349,15 +345,12 @@ GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h, { uint16_t hs = GNUNET_HELLO_size (hello); struct TransmissionQueueEntry *tqe; - -#if DEBUG_PEERINFO struct GNUNET_PeerIdentity peer; GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_id (hello, &peer)); LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding peer `%s' to PEERINFO database (%u bytes of `%s')\n", GNUNET_i2s (&peer), hs, "HELLO"); -#endif tqe = GNUNET_malloc (sizeof (struct TransmissionQueueEntry) + hs); tqe->size = hs; tqe->timeout = GNUNET_TIME_UNIT_FOREVER_ABS; @@ -438,10 +431,8 @@ peerinfo_handler (void *cls, const struct GNUNET_MessageHeader *msg) } if (ntohs (msg->type) == GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END) { -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Received end of list of peers from `%s' service\n", "PEERINFO"); -#endif trigger_transmit (ic->h); if (ic->timeout_task != GNUNET_SCHEDULER_NO_TASK) GNUNET_SCHEDULER_cancel (ic->timeout_task); @@ -483,12 +474,10 @@ peerinfo_handler (void *cls, const struct GNUNET_MessageHeader *msg) return; } } -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Received %u bytes of `%s' information about peer `%s' from `%s' service\n", (hello == NULL) ? 0 : (unsigned int) GNUNET_HELLO_size (hello), "HELLO", GNUNET_i2s (&im->peer), "PEERINFO"); -#endif ic->h->in_receive = GNUNET_YES; if (ic->callback != NULL) ic->callback (ic->callback_cls, &im->peer, hello, NULL); @@ -524,10 +513,8 @@ iterator_start_receive (void *cls, int transmit_success) GNUNET_free (ic); return; } -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Waiting for response from `%s' service.\n", "PEERINFO"); -#endif ic->h->in_receive = GNUNET_YES; ic->in_receive = GNUNET_YES; ic->tqe = NULL; @@ -590,10 +577,8 @@ GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, if (peer == NULL) { -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Requesting list of peers from PEERINFO service\n"); -#endif tqe = GNUNET_malloc (sizeof (struct TransmissionQueueEntry) + sizeof (struct GNUNET_MessageHeader)); @@ -604,11 +589,9 @@ GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, } else { -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Requesting information on peer `%4s' from PEERINFO service\n", GNUNET_i2s (peer)); -#endif tqe = GNUNET_malloc (sizeof (struct TransmissionQueueEntry) + sizeof (struct ListPeerMessage)); diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c index a0588db3d..2557cdfde 100644 --- a/src/peerinfo/peerinfo_api_notify.c +++ b/src/peerinfo/peerinfo_api_notify.c @@ -161,11 +161,9 @@ process_notification (void *cls, const struct GNUNET_MessageHeader *msg) return; } } -#if DEBUG_PEERINFO LOG (GNUNET_ERROR_TYPE_DEBUG, "Received information about peer `%s' from peerinfo database\n", GNUNET_i2s (&im->peer)); -#endif nc->callback (nc->callback_cls, &im->peer, hello, NULL); receive_notifications (nc); } -- cgit v1.2.3