diff options
author | t3sserakt <t3ss@posteo.de> | 2021-10-28 16:13:47 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-10-28 16:13:47 +0200 |
commit | 6fb788ca2ec44837ea10a36be7fd0030fb08955b (patch) | |
tree | cba4a385aa8ab914d02db9a702f6c6230aa89a2a /src/transport/transport_api_cmd_connecting_peers.c | |
parent | 1609d627e509043a946f611d7589105cfae2364d (diff) | |
download | gnunet-6fb788ca2ec44837ea10a36be7fd0030fb08955b.tar.gz gnunet-6fb788ca2ec44837ea10a36be7fd0030fb08955b.zip |
- fixed coverity issues
Diffstat (limited to 'src/transport/transport_api_cmd_connecting_peers.c')
-rw-r--r-- | src/transport/transport_api_cmd_connecting_peers.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c index 017d1bca3..2eb1b0914 100644 --- a/src/transport/transport_api_cmd_connecting_peers.c +++ b/src/transport/transport_api_cmd_connecting_peers.c | |||
@@ -72,6 +72,10 @@ connect_peers_run (void *cls, | |||
72 | 72 | ||
73 | cps->tl_system = tl_system; | 73 | cps->tl_system = tl_system; |
74 | 74 | ||
75 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
76 | "cps->num: %u \n", | ||
77 | cps->num); | ||
78 | |||
75 | cps->node_connections_head = GNUNET_TESTING_get_connections (cps->num, | 79 | cps->node_connections_head = GNUNET_TESTING_get_connections (cps->num, |
76 | cps->topology); | 80 | cps->topology); |
77 | 81 | ||
@@ -84,28 +88,15 @@ connect_peers_run (void *cls, | |||
84 | pos_prefix = | 88 | pos_prefix = |
85 | pos_prefix->next) | 89 | pos_prefix->next) |
86 | { | 90 | { |
87 | |||
88 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
89 | "prefix: %s\n", | ||
90 | pos_prefix->address_prefix); | ||
91 | |||
92 | addr = GNUNET_TESTING_get_address (pos_connection, | 91 | addr = GNUNET_TESTING_get_address (pos_connection, |
93 | pos_prefix->address_prefix); | 92 | pos_prefix->address_prefix); |
94 | |||
95 | peer = GNUNET_TESTING_get_pub_key (num, tl_system); | 93 | peer = GNUNET_TESTING_get_pub_key (num, tl_system); |
96 | |||
97 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
98 | "num: %u pub_key %s addr: %s\n", | ||
99 | num, | ||
100 | GNUNET_CRYPTO_eddsa_public_key_to_string (&(peer->public_key)), | ||
101 | addr); | ||
102 | |||
103 | cps->id = peer; | ||
104 | |||
105 | GNUNET_TRANSPORT_application_validate (ah, | 94 | GNUNET_TRANSPORT_application_validate (ah, |
106 | peer, | 95 | peer, |
107 | nt, | 96 | nt, |
108 | addr); | 97 | addr); |
98 | GNUNET_free (peer); | ||
99 | GNUNET_free (addr); | ||
109 | } | 100 | } |
110 | } | 101 | } |
111 | cps->con_num = con_num; | 102 | cps->con_num = con_num; |
@@ -136,6 +127,7 @@ notify_connect (void *cls, | |||
136 | if (0 == GNUNET_memcmp (peer, | 127 | if (0 == GNUNET_memcmp (peer, |
137 | peer_connection)) | 128 | peer_connection)) |
138 | con_num++; | 129 | con_num++; |
130 | GNUNET_free (peer_connection); | ||
139 | } | 131 | } |
140 | 132 | ||
141 | 133 | ||
@@ -156,7 +148,6 @@ connect_peers_cleanup (void *cls) | |||
156 | { | 148 | { |
157 | struct ConnectPeersState *cps = cls; | 149 | struct ConnectPeersState *cps = cls; |
158 | 150 | ||
159 | GNUNET_free (cps->id); | ||
160 | GNUNET_free (cps); | 151 | GNUNET_free (cps); |
161 | } | 152 | } |
162 | 153 | ||