aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_validation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r--src/transport/gnunet-service-transport_validation.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index d56aac8ad..c86bf67ff 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -264,10 +264,6 @@ struct ValidationEntry
264 */ 264 */
265 int expecting_pong; 265 int expecting_pong;
266 266
267 /* FIXME: DEBUGGING */
268 int last_line_set_to_no;
269 int last_line_set_to_yes;
270
271 enum GNUNET_ATS_Network_Type network; 267 enum GNUNET_ATS_Network_Type network;
272}; 268};
273 269
@@ -720,8 +716,6 @@ find_validation_entry (const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
720 return NULL; 716 return NULL;
721 ve = GNUNET_new (struct ValidationEntry); 717 ve = GNUNET_new (struct ValidationEntry);
722 ve->in_use = GNUNET_SYSERR; /* not defined */ 718 ve->in_use = GNUNET_SYSERR; /* not defined */
723 ve->last_line_set_to_no = 0;
724 ve->last_line_set_to_yes = 0;
725 ve->address = GNUNET_HELLO_address_copy (address); 719 ve->address = GNUNET_HELLO_address_copy (address);
726 ve->public_key = *public_key; 720 ve->public_key = *public_key;
727 ve->pid = address->peer; 721 ve->pid = address->peer;
@@ -1526,13 +1520,11 @@ GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
1526 * @param session the session 1520 * @param session the session
1527 * @param in_use #GNUNET_YES if we are now using the address for a connection, 1521 * @param in_use #GNUNET_YES if we are now using the address for a connection,
1528 * #GNUNET_NO if we are no longer using the address for a connection 1522 * #GNUNET_NO if we are no longer using the address for a connection
1529 * @param line line of caller just for DEBUGGING!
1530 */ 1523 */
1531void 1524void
1532GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address, 1525GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address,
1533 struct Session *session, 1526 struct Session *session,
1534 int in_use, 1527 int in_use)
1535 int line)
1536{ 1528{
1537 struct ValidationEntry *ve; 1529 struct ValidationEntry *ve;
1538 1530
@@ -1551,28 +1543,17 @@ GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address,
1551 if (GNUNET_YES == in_use) 1543 if (GNUNET_YES == in_use)
1552 { 1544 {
1553 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1545 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1554 "Error setting address in use for peer `%s' `%s' to USED: set last time by %i, called now by %i\n", 1546 "Error setting address in use for peer `%s' `%s' to USED\n",
1555 GNUNET_i2s (&address->peer), GST_plugins_a2s (address), 1547 GNUNET_i2s (&address->peer), GST_plugins_a2s (address));
1556 ve->last_line_set_to_yes, line);
1557 } 1548 }
1558 if (GNUNET_NO == in_use) 1549 if (GNUNET_NO == in_use)
1559 { 1550 {
1560 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1551 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1561 "Error setting address in use for peer `%s' `%s' to NOT_USED: set last time by %i, called now by %i\n", 1552 "Error setting address in use for peer `%s' `%s' to NOT_USED\n",
1562 GNUNET_i2s (&address->peer), GST_plugins_a2s (address), 1553 GNUNET_i2s (&address->peer), GST_plugins_a2s (address));
1563 ve->last_line_set_to_no, line);
1564 } 1554 }
1565 } 1555 }
1566 1556
1567 if (GNUNET_YES == in_use)
1568 {
1569 ve->last_line_set_to_yes = line;
1570 }
1571 if (GNUNET_NO == in_use)
1572 {
1573 ve->last_line_set_to_no = line;
1574 }
1575
1576 GNUNET_break (ve->in_use != in_use); /* should be different... */ 1557 GNUNET_break (ve->in_use != in_use); /* should be different... */
1577 ve->in_use = in_use; 1558 ve->in_use = in_use;
1578 if (in_use == GNUNET_YES) 1559 if (in_use == GNUNET_YES)