diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_ats.c')
-rw-r--r-- | src/transport/gnunet-service-transport_ats.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c index a660f252f..4fcf7c9dc 100644 --- a/src/transport/gnunet-service-transport_ats.c +++ b/src/transport/gnunet-service-transport_ats.c | |||
@@ -108,8 +108,6 @@ find_ai_cb (void *cls, | |||
108 | fc->ret = ai; | 108 | fc->ret = ai; |
109 | return GNUNET_NO; | 109 | return GNUNET_NO; |
110 | } | 110 | } |
111 | GNUNET_assert ( (fc->session != ai->session) || | ||
112 | (NULL == ai->session) ); | ||
113 | return GNUNET_YES; | 111 | return GNUNET_YES; |
114 | } | 112 | } |
115 | 113 | ||
@@ -140,21 +138,6 @@ find_ai (const struct GNUNET_HELLO_Address *address, | |||
140 | 138 | ||
141 | 139 | ||
142 | /** | 140 | /** |
143 | * Test if ATS knows about this address. | ||
144 | * | ||
145 | * @param address the address | ||
146 | * @param session the session | ||
147 | * @return #GNUNET_YES if address is known, #GNUNET_NO if not. | ||
148 | */ | ||
149 | int | ||
150 | GST_ats_is_known (const struct GNUNET_HELLO_Address *address, | ||
151 | struct Session *session) | ||
152 | { | ||
153 | return (NULL != find_ai (address, session)) ? GNUNET_YES : GNUNET_NO; | ||
154 | } | ||
155 | |||
156 | |||
157 | /** | ||
158 | * Notify ATS about the new address including the network this address is | 141 | * Notify ATS about the new address including the network this address is |
159 | * located in. | 142 | * located in. |
160 | * | 143 | * |
@@ -200,7 +183,7 @@ GST_ats_add_address (const struct GNUNET_HELLO_Address *address, | |||
200 | if (NULL == (papi = GST_plugins_find (address->transport_name))) | 183 | if (NULL == (papi = GST_plugins_find (address->transport_name))) |
201 | { | 184 | { |
202 | /* we don't have the plugin for this address */ | 185 | /* we don't have the plugin for this address */ |
203 | GNUNET_assert (0); | 186 | GNUNET_break(0); |
204 | return; | 187 | return; |
205 | } | 188 | } |
206 | if (NULL != session) | 189 | if (NULL != session) |
@@ -261,12 +244,7 @@ GST_ats_new_session (const struct GNUNET_HELLO_Address *address, | |||
261 | ai = find_ai (address, NULL); | 244 | ai = find_ai (address, NULL); |
262 | if (NULL == ai) | 245 | if (NULL == ai) |
263 | { | 246 | { |
264 | /* We may already be aware of the session, even if some other part | 247 | GNUNET_break (NULL != (find_ai (address, session))); |
265 | of the code could not tell if it just created a new session or | ||
266 | just got one recycled from the plugin; hence, we may be called | ||
267 | with "new" session even for an "old" session; in that case, | ||
268 | check that this is the case, but just ignore it. */ | ||
269 | GNUNET_assert (NULL != (find_ai (address, session))); | ||
270 | return; | 248 | return; |
271 | } | 249 | } |
272 | GNUNET_break (NULL == ai->session); | 250 | GNUNET_break (NULL == ai->session); |
@@ -352,9 +330,9 @@ GST_ats_update_metrics (const struct GNUNET_HELLO_Address *address, | |||
352 | and if we get metrics for those, they were never known to | 330 | and if we get metrics for those, they were never known to |
353 | ATS which means we end up here (however, in this | 331 | ATS which means we end up here (however, in this |
354 | case, the address must be an outbound address). */ | 332 | case, the address must be an outbound address). */ |
355 | GNUNET_assert (GNUNET_YES != | 333 | GNUNET_break (GNUNET_YES != |
356 | GNUNET_HELLO_address_check_option (address, | 334 | GNUNET_HELLO_address_check_option (address, |
357 | GNUNET_HELLO_ADDRESS_INFO_INBOUND)); | 335 | GNUNET_HELLO_ADDRESS_INFO_INBOUND)); |
358 | 336 | ||
359 | return; | 337 | return; |
360 | } | 338 | } |
@@ -416,7 +394,7 @@ GST_ats_expire_address (const struct GNUNET_HELLO_Address *address) | |||
416 | ai = find_ai (address, NULL); | 394 | ai = find_ai (address, NULL); |
417 | if (NULL == ai) | 395 | if (NULL == ai) |
418 | { | 396 | { |
419 | GNUNET_assert (0); | 397 | GNUNET_break (0); |
420 | return; | 398 | return; |
421 | } | 399 | } |
422 | GNUNET_assert (GNUNET_YES == | 400 | GNUNET_assert (GNUNET_YES == |