[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31473 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31473 - gnunet/src/mesh |
Date: |
Tue, 17 Dec 2013 11:05:04 +0100 |
Author: bartpolot
Date: 2013-12-17 11:05:04 +0100 (Tue, 17 Dec 2013)
New Revision: 31473
Modified:
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_connection.h
gnunet/src/mesh/gnunet-service-mesh_peer.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- log fixes, limit kx to live tunnels
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-12-17 09:36:58 UTC
(rev 31472)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-12-17 10:05:04 UTC
(rev 31473)
@@ -1187,7 +1187,7 @@
peer = get_next_hop (c);
if (GNUNET_OK != GMP_remove_connection (peer, c))
{
- GNUNET_break (MESH_CONNECTION_NEW == c->state
+ GNUNET_assert (MESH_CONNECTION_NEW == c->state
|| MESH_CONNECTION_DESTROYED == c->state);
LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state);
if (NULL != c->t) GMT_debug (c->t);
@@ -1196,7 +1196,7 @@
peer = get_prev_hop (c);
if (GNUNET_OK != GMP_remove_connection (peer, c))
{
- GNUNET_break (MESH_CONNECTION_NEW == c->state
+ GNUNET_assert (MESH_CONNECTION_NEW == c->state
|| MESH_CONNECTION_DESTROYED == c->state);
LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state);
if (NULL != c->t) GMT_debug (c->t);
@@ -2921,7 +2921,7 @@
* @param c Connection.
*/
const char *
-GMC_2s (struct MeshConnection *c)
+GMC_2s (const struct MeshConnection *c)
{
if (NULL == c)
return "NULL";
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.h 2013-12-17 09:36:58 UTC
(rev 31472)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.h 2013-12-17 10:05:04 UTC
(rev 31473)
@@ -517,7 +517,7 @@
* @param c Connection.
*/
const char *
-GMC_2s (struct MeshConnection *c);
+GMC_2s (const struct MeshConnection *c);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-12-17 09:36:58 UTC (rev
31472)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-12-17 10:05:04 UTC (rev
31473)
@@ -1093,9 +1093,7 @@
prev = q->prev;
if (q->c == c)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "GMP_cancel_queue %s\n",
- GM_m2s (q->type));
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "GMP_cancel_queue %s\n", GM_m2s (q->type));
GMP_queue_destroy (q, GNUNET_YES);
/* Get next from prev, q->next might be already freed:
@@ -1653,6 +1651,9 @@
GMP_remove_connection (struct MeshPeer *peer,
const struct MeshConnection *c)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "removing connection %s from peer %s\n",
+ GMC_2s (c), GMP_2s (peer));
if (NULL == peer || NULL == peer->connections)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-12-17 09:36:58 UTC
(rev 31472)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-12-17 10:05:04 UTC
(rev 31473)
@@ -341,9 +341,12 @@
static int
is_ready (struct MeshTunnel3 *t)
{
- return (MESH_TUNNEL3_READY == t->cstate
- && MESH_TUNNEL3_KEY_OK == t->estate)
- || GMT_is_loopback (t);
+ int ready;
+
+ GMT_debug (t);
+ ready = (MESH_TUNNEL3_READY == t->cstate && MESH_TUNNEL3_KEY_OK ==
t->estate);
+ ready = ready || GMT_is_loopback (t);
+ return ready;
}
@@ -889,6 +892,12 @@
return;
}
+ if (GNUNET_NO != t->destroy)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " being destroyed, why bother\n");
+ return;
+ }
+
/* Must have a connection. */
if (NULL == t->connection_head)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31473 - gnunet/src/mesh,
gnunet <=