[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1723 - in GNUnet/src: applications/gap server
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1723 - in GNUnet/src: applications/gap server |
Date: |
Wed, 17 Aug 2005 19:59:19 -0700 (PDT) |
Author: grothoff
Date: 2005-08-17 19:59:18 -0700 (Wed, 17 Aug 2005)
New Revision: 1723
Modified:
GNUnet/src/applications/gap/gap.c
GNUnet/src/server/connection.c
GNUnet/src/server/handler.c
Log:
killing debug statements -- problem fixed
Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c 2005-08-18 02:44:25 UTC (rev 1722)
+++ GNUnet/src/applications/gap/gap.c 2005-08-18 02:59:18 UTC (rev 1723)
@@ -44,6 +44,8 @@
#include "gnunet_traffic_service.h"
#include "gnunet_topology_service.h"
+#define DEBUG_GAP NO
+
#define EXTRA_CHECKS YES
@@ -802,6 +804,7 @@
return;
if (getBit(qr, getIndex(id)) == 1) {
+#if DEBUG_GAP
IFLOG(LOG_DEBUG,
hash2enc(&id->hashPubKey,
&encp);
@@ -811,6 +814,7 @@
"Sending query '%s' to '%s'\n",
&encq,
&encp);
+#endif
coreAPI->unicast(id,
&qr->msg->header,
BASE_QUERY_PRIORITY
@@ -1030,12 +1034,14 @@
unsigned int size;
EncName enc;
+#if DEBUG_GAP
IFLOG(LOG_DEBUG,
hash2enc(primaryKey,
&enc));
LOG(LOG_DEBUG,
"Gap queues reply to query '%s' for later use.\n",
&enc);
+#endif
#if EXTRA_CHECKS
/* verify data is valid */
@@ -1451,12 +1457,14 @@
maxDelay = TTL_DECREMENT; /* for expired queries */
/* send to peers */
for (j=0;j<ite->hostsWaiting;j++) {
+#if DEBUG_GAP
IFLOG(LOG_DEBUG,
hash2enc(&ite->destination[j].hashPubKey,
&enc));
LOG(LOG_DEBUG,
"GAP sending reply to '%s'\n",
&enc);
+#endif
coreAPI->unicast(&ite->destination[j],
msg,
BASE_REPLY_PRIORITY *
@@ -1583,6 +1591,7 @@
if ( (policy & QUERY_FORWARD) == 0)
doForward = NO;
+#if DEBUG_GAP
IFLOG(LOG_DEBUG,
hash2enc(&query->queries[0],
&enc));
@@ -1591,7 +1600,7 @@
&enc,
doForward ? "forwarding" : "",
isRouted ? "routing" : "");
-
+#endif
cls.values = NULL;
cls.valueCount = 0;
cls.sender = sender;
@@ -1685,6 +1694,7 @@
double preference;
EncName enc;
+#if DEBUG_GAP
IFLOG(LOG_DEBUG,
if (hostId != NULL)
hash2enc(&hostId->hashPubKey,
@@ -1692,6 +1702,7 @@
LOG(LOG_DEBUG,
"GAP received content from '%s'\n",
(hostId != NULL) ? (const char*)&enc : "myself");
+#endif
if (ntohs(msg->header.size) < sizeof(P2P_gap_reply_MESSAGE)) {
BREAK();
return SYSERR; /* invalid! */
@@ -2039,16 +2050,20 @@
prio = ntohl(qmsg->priority);
policy = evaluateQuery(sender,
&prio);
+#if DEBUG_GAP
IFLOG(LOG_DEBUG,
hash2enc(&qmsg->queries[0],
&enc));
LOG(LOG_DEBUG,
"Received GAP query '%s'.\n",
&enc);
+#endif
if ((policy & QUERY_DROPMASK) == 0) {
FREE(qmsg);
+#if DEBUG_GAP
LOG(LOG_DEBUG,
"Dropping query, policy decided that this peer is too busy.\n");
+#endif
return OK; /* straight drop. */
}
preference = (double) prio;
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2005-08-18 02:44:25 UTC (rev 1722)
+++ GNUnet/src/server/connection.c 2005-08-18 02:59:18 UTC (rev 1723)
@@ -1120,7 +1120,7 @@
} else {
ret++;
}
-#if 1
+#if 0
{
P2P_MESSAGE_HEADER * hdr;
EncName enc;
Modified: GNUnet/src/server/handler.c
===================================================================
--- GNUnet/src/server/handler.c 2005-08-18 02:44:25 UTC (rev 1722)
+++ GNUnet/src/server/handler.c 2005-08-18 02:59:18 UTC (rev 1723)
@@ -34,6 +34,7 @@
#include "connection.h"
#include "tcpserver.h"
+#define DEBUG_HANDLER NO
/**
* How many incoming packages do we have in the buffer
@@ -345,8 +346,10 @@
const P2P_MESSAGE_HEADER * part;
P2P_MESSAGE_HEADER cpart;
P2P_MESSAGE_HEADER * copy;
+ int last;
+#if DEBUG_HANDLER
EncName enc;
- int last;
+#endif
pos = 0;
copy = NULL;
@@ -386,6 +389,7 @@
pos += plen;
ptyp = htons(part->type);
+#if DEBUG_HANDLER
IFLOG(LOG_DEBUG,
hash2enc(&sender->hashPubKey,
&enc));
@@ -394,6 +398,7 @@
wasEncrypted ? "encrypted" : "plaintext",
ptyp,
&enc);
+#endif
if (YES == wasEncrypted) {
MessagePartHandler callback;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1723 - in GNUnet/src: applications/gap server,
grothoff <=