diff options
author | marshall <stmr@umich.edu> | 2023-08-07 13:11:06 -0400 |
---|---|---|
committer | marshall <stmr@umich.edu> | 2023-08-21 13:30:28 -0400 |
commit | fa46c7f4968ef5a64f2372b33efc8bcbc2a2eafe (patch) | |
tree | 044f55080b727dc5019cb4d07136c4b3584dd8da | |
parent | ecfbd79c029090dfbc657194adae2d229273fb9d (diff) | |
download | gnunet-fa46c7f4968ef5a64f2372b33efc8bcbc2a2eafe.tar.gz gnunet-fa46c7f4968ef5a64f2372b33efc8bcbc2a2eafe.zip |
quic: remove hn
-rw-r--r-- | src/transport/gnunet-communicator-quic.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/transport/gnunet-communicator-quic.c b/src/transport/gnunet-communicator-quic.c index 76b0ebd62..70fdd0bf4 100644 --- a/src/transport/gnunet-communicator-quic.c +++ b/src/transport/gnunet-communicator-quic.c | |||
@@ -141,13 +141,13 @@ struct PeerAddress | |||
141 | /** | 141 | /** |
142 | * Entry in sender expiration heap. | 142 | * Entry in sender expiration heap. |
143 | */ | 143 | */ |
144 | struct GNUNET_CONTAINER_HeapNode *hn; | 144 | // struct GNUNET_CONTAINER_HeapNode *hn; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | /** | 147 | // /** |
148 | * Expiration heap for peers (contains `struct PeerAddress`) | 148 | // * Expiration heap for peers (contains `struct PeerAddress`) |
149 | */ | 149 | // */ |
150 | static struct GNUNET_CONTAINER_Heap *peers_heap; | 150 | // static struct GNUNET_CONTAINER_Heap *peers_heap; |
151 | 151 | ||
152 | /** | 152 | /** |
153 | * ID of timeout task | 153 | * ID of timeout task |
@@ -433,8 +433,8 @@ reschedule_peer_timeout (struct PeerAddress *peer) | |||
433 | { | 433 | { |
434 | peer->timeout = | 434 | peer->timeout = |
435 | GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 435 | GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
436 | GNUNET_CONTAINER_heap_update_cost (peer->hn, | 436 | // GNUNET_CONTAINER_heap_update_cost (peer->hn, |
437 | peer->timeout.abs_value_us); | 437 | // peer->timeout.abs_value_us); |
438 | } | 438 | } |
439 | 439 | ||
440 | 440 | ||
@@ -457,7 +457,7 @@ peer_destroy (struct PeerAddress *peer) | |||
457 | GNUNET_TRANSPORT_communicator_mq_del (peer->d_qh); | 457 | GNUNET_TRANSPORT_communicator_mq_del (peer->d_qh); |
458 | peer->d_qh = NULL; | 458 | peer->d_qh = NULL; |
459 | } | 459 | } |
460 | GNUNET_assert (peer == GNUNET_CONTAINER_heap_remove_node (peer->hn)); | 460 | // GNUNET_assert (peer == GNUNET_CONTAINER_heap_remove_node (peer->hn)); |
461 | /** | 461 | /** |
462 | * Remove peer from hashmap | 462 | * Remove peer from hashmap |
463 | */ | 463 | */ |
@@ -1006,9 +1006,9 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer_id, const | |||
1006 | peer->nt = GNUNET_NT_scanner_get_type (is, in, in_len); | 1006 | peer->nt = GNUNET_NT_scanner_get_type (is, in, in_len); |
1007 | peer->timeout = | 1007 | peer->timeout = |
1008 | GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 1008 | GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
1009 | peer->hn = GNUNET_CONTAINER_heap_insert (peers_heap, | 1009 | // peer->hn = GNUNET_CONTAINER_heap_insert (peers_heap, |
1010 | peer, | 1010 | // peer, |
1011 | peer->timeout.abs_value_us); | 1011 | // peer->timeout.abs_value_us); |
1012 | GNUNET_STATISTICS_set (stats, | 1012 | GNUNET_STATISTICS_set (stats, |
1013 | "# peers active", | 1013 | "# peers active", |
1014 | GNUNET_CONTAINER_multihashmap_size (addr_map), | 1014 | GNUNET_CONTAINER_multihashmap_size (addr_map), |
@@ -1593,6 +1593,7 @@ run (void *cls, | |||
1593 | NULL, | 1593 | NULL, |
1594 | ¬ify_cb, | 1594 | ¬ify_cb, |
1595 | NULL); | 1595 | NULL); |
1596 | GNUNET_NT_scanner_init (); | ||
1596 | nat = GNUNET_NAT_register (cfg, | 1597 | nat = GNUNET_NAT_register (cfg, |
1597 | COMMUNICATOR_CONFIG_SECTION, | 1598 | COMMUNICATOR_CONFIG_SECTION, |
1598 | IPPROTO_UDP, | 1599 | IPPROTO_UDP, |