[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5193 - in GNUnet/src: applications/identity applications/t
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5193 - in GNUnet/src: applications/identity applications/topology_default server |
Date: |
Sun, 1 Jul 2007 01:47:02 -0600 (MDT) |
Author: grothoff
Date: 2007-07-01 01:47:02 -0600 (Sun, 01 Jul 2007)
New Revision: 5193
Modified:
GNUnet/src/applications/identity/identity.c
GNUnet/src/applications/topology_default/topology.c
GNUnet/src/server/connection.c
GNUnet/src/server/connection.h
GNUnet/src/server/handler.c
Log:
hacking
Modified: GNUnet/src/applications/identity/identity.c
===================================================================
--- GNUnet/src/applications/identity/identity.c 2007-07-01 06:58:33 UTC (rev
5192)
+++ GNUnet/src/applications/identity/identity.c 2007-07-01 07:47:02 UTC (rev
5193)
@@ -867,7 +867,7 @@
return OK;
}
if (strict) {
- entry->delta = desperation * cronSECONDS;
+ entry->delta = desperation * cronSECONDS;
} else {
if (entry->until < now)
entry->delta
Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2007-07-01 06:58:33 UTC
(rev 5192)
+++ GNUnet/src/applications/topology_default/topology.c 2007-07-01 07:47:02 UTC
(rev 5193)
@@ -41,7 +41,7 @@
#define DEBUG_TOPOLOGY NO
-#define DEBUG_LIVENESS NO
+#define DEBUG_LIVENESS YES
/**
* After 2 minutes on an inactive connection, probe the other
@@ -169,7 +169,7 @@
static void scanForHosts(unsigned int index) {
IndexMatch indexMatch;
cron_t now;
-#if DEBUG_TOPOLOGY
+#if DEBUG_TOPOLOGY || 1
EncName enc;
#endif
@@ -213,7 +213,7 @@
return;
}
-#if DEBUG_TOPOLOGY
+#if DEBUG_TOPOLOGY || 1
IF_GELOG(coreAPI->ectx,
GE_DEBUG | GE_REQUEST | GE_USER | GE_DEVELOPER,
hash2enc(&indexMatch.match.hashPubKey,
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2007-07-01 06:58:33 UTC (rev 5192)
+++ GNUnet/src/server/connection.c 2007-07-01 07:47:02 UTC (rev 5193)
@@ -62,7 +62,7 @@
/* tuning parameters */
-#define DEBUG_CONNECTION NO
+#define DEBUG_CONNECTION YES
/**
* output knapsack priorities into a file?
@@ -2453,9 +2453,7 @@
&enc,
now - root->isAlive);
#endif
- /* this was a valuable peer except for the timeout,
- let's keep it as a possibility for the near
- future! */
+ /* peer timed out -- shutdown connection */
identity->blacklistHost(&root->session.sender,
SECONDS_BLACKLIST_AFTER_DISCONNECT,
YES);
@@ -2517,10 +2515,13 @@
&enc,
(root->status == STAT_SETKEY_SENT) ? "SETKEY" : "PING");
#endif
- /* do not try to reconnect any time soon! */
+ /* do not try to reconnect any time soon,
+ but allow the other peer to connect to
+ us -- after all, we merely failed to
+ establish a session in the first place! */
identity->blacklistHost(&root->session.sender,
SECONDS_BLACKLIST_AFTER_FAILED_CONNECT,
- YES);
+ NO);
shutdownConnection(root);
}
break;
@@ -3501,23 +3502,6 @@
}
/**
- * Are we connected to this peer?
- *
- * @param hi the peer in question
- * @return NO if we are not connected, YES if we are
- */
-int isConnected(const PeerIdentity * hi) {
- BufferEntry *be;
-
- MUTEX_LOCK(lock);
- be = lookForHost(hi);
- MUTEX_UNLOCK(lock);
- if (be == NULL)
- return NO;
- return (be->status == STAT_UP);
-}
-
-/**
* Compute the hashtable index of a host id.
*
* @param hostId the ID of a peer
Modified: GNUnet/src/server/connection.h
===================================================================
--- GNUnet/src/server/connection.h 2007-07-01 06:58:33 UTC (rev 5192)
+++ GNUnet/src/server/connection.h 2007-07-01 07:47:02 UTC (rev 5193)
@@ -104,12 +104,6 @@
/* ***************** CORE API methods ************* */
/**
- * Are we connected to this host?
- * @return YES or NO.
- */
-int isConnected(const PeerIdentity * hi);
-
-/**
* Call method for every connected node.
*/
int forEachConnectedNode(PerNodeCallback method,
Modified: GNUnet/src/server/handler.c
===================================================================
--- GNUnet/src/server/handler.c 2007-07-01 06:58:33 UTC (rev 5192)
+++ GNUnet/src/server/handler.c 2007-07-01 07:47:02 UTC (rev 5193)
@@ -580,6 +580,9 @@
GE_DEBUG | GE_DEVELOPER | GE_REQUEST,
"Strictly blacklisted peer `%s' sent message, dropping for now.\n",
(char*)&enc);
+ if (OK == getBandwidthAssignedTo(&mp->sender, NULL, NULL)) {
+ abort();
+ }
FREE(mp->msg);
FREE(mp);
return;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5193 - in GNUnet/src: applications/identity applications/topology_default server,
gnunet <=