diff options
Diffstat (limited to 'src/testing/testing_group.c')
-rw-r--r-- | src/testing/testing_group.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index 10aa31770..14bf31bbc 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | #define TOPOLOGY_HACK GNUNET_YES | 43 | #define TOPOLOGY_HACK GNUNET_YES |
44 | 44 | ||
45 | #define AVOID_CONN_MALLOC GNUNET_NO | ||
46 | 45 | ||
47 | /** | 46 | /** |
48 | * Lowest port used for GNUnet testing. Should be high enough to not | 47 | * Lowest port used for GNUnet testing. Should be high enough to not |
@@ -784,12 +783,6 @@ struct GNUNET_TESTING_PeerGroup | |||
784 | * Connection context for peer group. | 783 | * Connection context for peer group. |
785 | */ | 784 | */ |
786 | struct ConnectTopologyContext ct_ctx; | 785 | struct ConnectTopologyContext ct_ctx; |
787 | |||
788 | #if AVOID_CONN_MALLOC | ||
789 | struct PeerConnection working_peer_connections[200000]; | ||
790 | |||
791 | unsigned int current_peer_connection; | ||
792 | #endif | ||
793 | }; | 786 | }; |
794 | 787 | ||
795 | struct UpdateContext | 788 | struct UpdateContext |
@@ -1649,12 +1642,7 @@ add_connections(struct GNUNET_TESTING_PeerGroup *pg, unsigned int first, | |||
1649 | added = 0; | 1642 | added = 0; |
1650 | if (add_first) | 1643 | if (add_first) |
1651 | { | 1644 | { |
1652 | #if AVOID_CONN_MALLOC | ||
1653 | new_first = &pg->working_peer_connections[pg->current_peer_connection]; | ||
1654 | pg->current_peer_connection++; | ||
1655 | #else | ||
1656 | new_first = GNUNET_malloc (sizeof (struct PeerConnection)); | 1645 | new_first = GNUNET_malloc (sizeof (struct PeerConnection)); |
1657 | #endif | ||
1658 | new_first->index = second; | 1646 | new_first->index = second; |
1659 | GNUNET_CONTAINER_DLL_insert(*first_list, *first_tail, new_first); | 1647 | GNUNET_CONTAINER_DLL_insert(*first_list, *first_tail, new_first); |
1660 | pg->peers[first].num_connections++; | 1648 | pg->peers[first].num_connections++; |
@@ -1663,12 +1651,7 @@ add_connections(struct GNUNET_TESTING_PeerGroup *pg, unsigned int first, | |||
1663 | 1651 | ||
1664 | if (add_second) | 1652 | if (add_second) |
1665 | { | 1653 | { |
1666 | #if AVOID_CONN_MALLOC | ||
1667 | new_second = &pg->working_peer_connections[pg->current_peer_connection]; | ||
1668 | pg->current_peer_connection++; | ||
1669 | #else | ||
1670 | new_second = GNUNET_malloc (sizeof (struct PeerConnection)); | 1654 | new_second = GNUNET_malloc (sizeof (struct PeerConnection)); |
1671 | #endif | ||
1672 | new_second->index = first; | 1655 | new_second->index = first; |
1673 | GNUNET_CONTAINER_DLL_insert(*second_list, *second_tail, new_second); | 1656 | GNUNET_CONTAINER_DLL_insert(*second_list, *second_tail, new_second); |
1674 | pg->peers[second].num_connections++; | 1657 | pg->peers[second].num_connections++; |