[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4075 - in GNUnet/src: server util/network
From: |
grothoff |
Subject: |
[GNUnet-SVN] r4075 - in GNUnet/src: server util/network |
Date: |
Wed, 27 Dec 2006 06:27:27 -0800 (PST) |
Author: grothoff
Date: 2006-12-27 06:27:24 -0800 (Wed, 27 Dec 2006)
New Revision: 4075
Modified:
GNUnet/src/server/connection.c
GNUnet/src/util/network/io.c
Log:
reduce DEBUG logging
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2006-12-27 08:15:36 UTC (rev 4074)
+++ GNUnet/src/server/connection.c 2006-12-27 14:27:24 UTC (rev 4075)
@@ -2417,6 +2417,7 @@
total_allowed_recv += root->idealized_limit;
if ( (now > root->isAlive) && /* concurrency might make this false...
*/
(now - root->isAlive > SECONDS_INACTIVE_DROP * cronSECONDS) ) {
+#if DEBUG_CONNECTION
EncName enc;
/* switch state form UP to DOWN: too much inactivity */
@@ -2430,6 +2431,7 @@
"too much inactivity (%llu ms)\n",
&enc,
now - root->isAlive);
+#endif
shutdownConnection(root);
/* the host may still be worth trying again soon: */
identity->whitelistHost(&root->session.sender);
@@ -2656,7 +2658,9 @@
static int handleHANGUP(const PeerIdentity * sender,
const MESSAGE_HEADER * msg) {
BufferEntry *be;
+#if DEBUG_CONNECTION
EncName enc;
+#endif
ENTRY();
if(ntohs(msg->size) != sizeof(P2P_hangup_MESSAGE))
@@ -2665,14 +2669,16 @@
&((P2P_hangup_MESSAGE *) msg)->sender,
sizeof(PeerIdentity)))
return SYSERR;
+#if DEBUG_CONNECTION
IF_GELOG(ectx,
- GE_INFO | GE_BULK | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&sender->hashPubKey,
&enc));
GE_LOG(ectx,
- GE_INFO | GE_BULK | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
"received HANGUP from `%s'\n",
&enc);
+#endif
MUTEX_LOCK(lock);
be = lookForHost(sender);
if(be == NULL) {
Modified: GNUnet/src/util/network/io.c
===================================================================
--- GNUnet/src/util/network/io.c 2006-12-27 08:15:36 UTC (rev 4074)
+++ GNUnet/src/util/network/io.c 2006-12-27 14:27:24 UTC (rev 4075)
@@ -28,6 +28,8 @@
#include "platform.h"
#include "network.h"
+#define DEBUG_IO NO
+
/**
* Global lock for gethostbyname.
*/
@@ -246,9 +248,11 @@
*read = pos;
return (pos == 0) ? NO : YES;
}
+#if DEBUG_IO
GE_LOG_STRERROR(s->ectx,
GE_DEBUG | GE_USER | GE_REQUEST,
"recv");
+#endif
*read = pos;
return SYSERR;
}
@@ -325,9 +329,11 @@
*read = pos;
return (pos == 0) ? NO : YES;
}
+#if DEBUG_IO
GE_LOG_STRERROR(s->ectx,
GE_DEBUG | GE_USER | GE_REQUEST,
- "recv");
+ "recvfrom");
+#endif
*read = pos;
return SYSERR;
}
@@ -400,9 +406,11 @@
*sent = pos;
return (pos == 0) ? NO : YES;
}
+#if DEBUG_IO
GE_LOG_STRERROR(s->ectx,
GE_DEBUG | GE_USER | GE_REQUEST,
"send");
+#endif
*sent = pos;
return SYSERR;
}
@@ -479,9 +487,11 @@
*sent = pos;
return (pos == 0) ? NO : YES;
}
+#if DEBUG_IO
GE_LOG_STRERROR(s->ectx,
GE_DEBUG | GE_USER | GE_REQUEST,
- "send");
+ "sendto");
+#endif
*sent = pos;
return SYSERR;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4075 - in GNUnet/src: server util/network,
grothoff <=