diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-04-07 13:57:14 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-04-07 13:57:14 +0000 |
commit | 09d0a105b21f2061477988124904cc3ad886e803 (patch) | |
tree | 41c9d6f97e4b73ce862d30f21293a0d70637e4fd /src/transport/gnunet-service-transport_neighbours.c | |
parent | 13da047628192121db09c1aa5bb2c30f9118f5e1 (diff) | |
download | gnunet-09d0a105b21f2061477988124904cc3ad886e803.tar.gz gnunet-09d0a105b21f2061477988124904cc3ad886e803.zip |
obtain papi only once
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 030a4aae2..a6c9dd0e2 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -2425,8 +2425,10 @@ switch_address_bl_check_cont (void *cls, | |||
2425 | struct GNUNET_TRANSPORT_PluginFunctions *papi; | 2425 | struct GNUNET_TRANSPORT_PluginFunctions *papi; |
2426 | struct NeighbourMapEntry *n; | 2426 | struct NeighbourMapEntry *n; |
2427 | 2427 | ||
2428 | papi = GST_plugins_find (blc_ctx->address->transport_name); | ||
2429 | |||
2428 | if ( (NULL == (n = lookup_neighbour (peer))) || (result == GNUNET_NO) || | 2430 | if ( (NULL == (n = lookup_neighbour (peer))) || (result == GNUNET_NO) || |
2429 | (NULL == (papi = GST_plugins_find (blc_ctx->address->transport_name))) ) | 2431 | (NULL == (papi)) ) |
2430 | { | 2432 | { |
2431 | if (NULL == n) | 2433 | if (NULL == n) |
2432 | { | 2434 | { |
@@ -2442,7 +2444,7 @@ switch_address_bl_check_cont (void *cls, | |||
2442 | blc_ctx->session, | 2444 | blc_ctx->session, |
2443 | GNUNET_i2s (&blc_ctx->address->peer)); | 2445 | GNUNET_i2s (&blc_ctx->address->peer)); |
2444 | } | 2446 | } |
2445 | if (NULL == (papi = GST_plugins_find (blc_ctx->address->transport_name))) | 2447 | if (NULL == papi) |
2446 | { | 2448 | { |
2447 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2449 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2448 | "Plugin `%s' for suggested address `%s' session %p for peer `%s' is not available\n", | 2450 | "Plugin `%s' for suggested address `%s' session %p for peer `%s' is not available\n", |