aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-12-15 07:18:18 +0000
committerBart Polot <bart@net.in.tum.de>2014-12-15 07:18:18 +0000
commita5b5d0f609398c8c02d2a04b7818e8ce0837be02 (patch)
tree40a68f7cd3a54666aada7b0b62e8c5a8b9d7774c /src/cadet
parent74272fb59db6929e5facc7925b221e998bab72c4 (diff)
downloadgnunet-a5b5d0f609398c8c02d2a04b7818e8ce0837be02.tar.gz
gnunet-a5b5d0f609398c8c02d2a04b7818e8ce0837be02.zip
- more debug, eliminate bogus assertions
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 9ae19ecdc..e1883ce00 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -855,7 +855,7 @@ send_broken (struct CadetConnection *c,
855 855
856/** 856/**
857 * Send a notification that a connection is broken, when a connection 857 * Send a notification that a connection is broken, when a connection
858 * isn't even known to the local peer. 858 * isn't even known to the local peer or soon to be destroyed.
859 * 859 *
860 * @param connection_id Connection ID. 860 * @param connection_id Connection ID.
861 * @param id1 Peer that has disconnected, probably local peer. 861 * @param id1 Peer that has disconnected, probably local peer.
@@ -1333,6 +1333,8 @@ connection_fwd_timeout (void *cls,
1333 /* If dest, salvage queued traffic. */ 1333 /* If dest, salvage queued traffic. */
1334 if (GCC_is_origin (c, GNUNET_NO) && 0 < c->bck_fc.queue_n) 1334 if (GCC_is_origin (c, GNUNET_NO) && 0 < c->bck_fc.queue_n)
1335 { 1335 {
1336 send_broken_unknown (&c->id, &my_full_id, NULL,
1337 GCP_get_id( get_prev_hop (c)));
1336 resend_messages_and_destroy (c, GNUNET_NO); 1338 resend_messages_and_destroy (c, GNUNET_NO);
1337 return; 1339 return;
1338 } 1340 }
@@ -1372,6 +1374,8 @@ connection_bck_timeout (void *cls,
1372 /* If dest, salvage queued traffic. */ 1374 /* If dest, salvage queued traffic. */
1373 if (GCC_is_origin (c, GNUNET_YES) && 0 < c->fwd_fc.queue_n) 1375 if (GCC_is_origin (c, GNUNET_YES) && 0 < c->fwd_fc.queue_n)
1374 { 1376 {
1377 send_broken_unknown (&c->id, &my_full_id, NULL,
1378 GCP_get_id( get_next_hop (c)));
1375 resend_messages_and_destroy (c, GNUNET_YES); 1379 resend_messages_and_destroy (c, GNUNET_YES);
1376 return; 1380 return;
1377 } 1381 }
@@ -1485,8 +1489,6 @@ unregister_neighbors (struct CadetConnection *c)
1485 peer = get_next_hop (c); 1489 peer = get_next_hop (c);
1486 if (GNUNET_OK != GCP_remove_connection (peer, c)) 1490 if (GNUNET_OK != GCP_remove_connection (peer, c))
1487 { 1491 {
1488 GNUNET_assert (CADET_CONNECTION_NEW == c->state
1489 || CADET_CONNECTION_DESTROYED <= c->state);
1490 LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); 1492 LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state);
1491 if (NULL != c->t) GCT_debug (c->t, GNUNET_ERROR_TYPE_DEBUG); 1493 if (NULL != c->t) GCT_debug (c->t, GNUNET_ERROR_TYPE_DEBUG);
1492 } 1494 }
@@ -1494,8 +1496,6 @@ unregister_neighbors (struct CadetConnection *c)
1494 peer = get_prev_hop (c); 1496 peer = get_prev_hop (c);
1495 if (GNUNET_OK != GCP_remove_connection (peer, c)) 1497 if (GNUNET_OK != GCP_remove_connection (peer, c))
1496 { 1498 {
1497 GNUNET_assert (CADET_CONNECTION_NEW == c->state
1498 || CADET_CONNECTION_DESTROYED <= c->state);
1499 LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); 1499 LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state);
1500 if (NULL != c->t) GCT_debug (c->t, GNUNET_ERROR_TYPE_DEBUG); 1500 if (NULL != c->t) GCT_debug (c->t, GNUNET_ERROR_TYPE_DEBUG);
1501 } 1501 }
@@ -1589,7 +1589,8 @@ does_connection_exist (struct CadetConnection *conn)
1589 c = conn->path->c; 1589 c = conn->path->c;
1590 conn->destroy = GNUNET_NO; 1590 conn->destroy = GNUNET_NO;
1591 conn->path->c = conn; 1591 conn->path->c = conn;
1592 LOG (GNUNET_ERROR_TYPE_DEBUG, " found one\n"); 1592 LOG (GNUNET_ERROR_TYPE_DEBUG, " found duplicate of %s\n", GCC_2s (conn));
1593 LOG (GNUNET_ERROR_TYPE_DEBUG, " duplicate: %s\n", GCC_2s (c));
1593 GCC_debug (c, GNUNET_ERROR_TYPE_DEBUG); 1594 GCC_debug (c, GNUNET_ERROR_TYPE_DEBUG);
1594 if (CADET_CONNECTION_READY == c->state) 1595 if (CADET_CONNECTION_READY == c->state)
1595 { 1596 {
@@ -1605,7 +1606,10 @@ does_connection_exist (struct CadetConnection *conn)
1605 return GNUNET_YES; 1606 return GNUNET_YES;
1606 } 1607 }
1607 else 1608 else
1609 {
1610 LOG (GNUNET_ERROR_TYPE_DEBUG, " %s has no duplicates\n", GCC_2s (conn));
1608 return GNUNET_NO; 1611 return GNUNET_NO;
1612 }
1609} 1613}
1610 1614
1611 1615