[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20856 - gnunet/src/peerinfo
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20856 - gnunet/src/peerinfo |
Date: |
Mon, 2 Apr 2012 15:48:08 +0200 |
Author: grothoff
Date: 2012-04-02 15:48:08 +0200 (Mon, 02 Apr 2012)
New Revision: 20856
Modified:
gnunet/src/peerinfo/gnunet-service-peerinfo.c
gnunet/src/peerinfo/peerinfo.h
gnunet/src/peerinfo/peerinfo_api.c
gnunet/src/peerinfo/peerinfo_api_notify.c
Log:
-removing legacy ifdefs
Modified: gnunet/src/peerinfo/gnunet-service-peerinfo.c
===================================================================
--- gnunet/src/peerinfo/gnunet-service-peerinfo.c 2012-04-02 13:04:53 UTC
(rev 20855)
+++ gnunet/src/peerinfo/gnunet-service-peerinfo.c 2012-04-02 13:48:08 UTC
(rev 20856)
@@ -534,10 +534,8 @@
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 @@
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 @@
{
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 @@
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);
Modified: gnunet/src/peerinfo/peerinfo.h
===================================================================
--- gnunet/src/peerinfo/peerinfo.h 2012-04-02 13:04:53 UTC (rev 20855)
+++ gnunet/src/peerinfo/peerinfo.h 2012-04-02 13:48:08 UTC (rev 20856)
@@ -27,7 +27,6 @@
#include "gnunet_time_lib.h"
#include "gnunet_peerinfo_service.h"
-#define DEBUG_PEERINFO GNUNET_EXTRA_LOGGING
GNUNET_NETWORK_STRUCT_BEGIN
Modified: gnunet/src/peerinfo/peerinfo_api.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api.c 2012-04-02 13:04:53 UTC (rev 20855)
+++ gnunet/src/peerinfo/peerinfo_api.c 2012-04-02 13:48:08 UTC (rev 20856)
@@ -274,10 +274,8 @@
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 @@
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 @@
{
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 @@
}
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 @@
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 @@
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 @@
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 @@
}
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));
Modified: gnunet/src/peerinfo/peerinfo_api_notify.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api_notify.c 2012-04-02 13:04:53 UTC (rev
20855)
+++ gnunet/src/peerinfo/peerinfo_api_notify.c 2012-04-02 13:48:08 UTC (rev
20856)
@@ -161,11 +161,9 @@
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);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20856 - gnunet/src/peerinfo,
gnunet <=