diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh_connection.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 72f7a122c..9806bf674 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c | |||
@@ -1553,7 +1553,7 @@ GMC_handle_destroy (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1553 | * destroyed the tunnel and retransmitted to children. | 1553 | * destroyed the tunnel and retransmitted to children. |
1554 | * Safe to ignore. | 1554 | * Safe to ignore. |
1555 | */ | 1555 | */ |
1556 | GNUNET_STATISTICS_update (stats, "# control on unknown tunnel", | 1556 | GNUNET_STATISTICS_update (stats, "# control on unknown connection", |
1557 | 1, GNUNET_NO); | 1557 | 1, GNUNET_NO); |
1558 | LOG (GNUNET_ERROR_TYPE_DEBUG, " connection unknown: already destroyed?\n"); | 1558 | LOG (GNUNET_ERROR_TYPE_DEBUG, " connection unknown: already destroyed?\n"); |
1559 | return GNUNET_OK; | 1559 | return GNUNET_OK; |
@@ -1564,7 +1564,14 @@ GMC_handle_destroy (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1564 | GNUNET_break_op (0); | 1564 | GNUNET_break_op (0); |
1565 | return GNUNET_OK; | 1565 | return GNUNET_OK; |
1566 | } | 1566 | } |
1567 | GMC_send_prebuilt_message (message, c, fwd, GNUNET_YES, NULL, NULL); | 1567 | if (GNUNET_NO == GMC_is_terminal (c, fwd)) |
1568 | GMC_send_prebuilt_message (message, c, fwd, GNUNET_YES, NULL, NULL); | ||
1569 | else if (0 == c->pending_messages) | ||
1570 | { | ||
1571 | LOG (GNUNET_ERROR_TYPE_DEBUG, "! directly destroying connection!\n"); | ||
1572 | GMC_destroy (c); | ||
1573 | return; | ||
1574 | } | ||
1568 | c->destroy = GNUNET_YES; | 1575 | c->destroy = GNUNET_YES; |
1569 | c->state = MESH_CONNECTION_DESTROYED; | 1576 | c->state = MESH_CONNECTION_DESTROYED; |
1570 | 1577 | ||