aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-04-07 13:57:14 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-04-07 13:57:14 +0000
commit09d0a105b21f2061477988124904cc3ad886e803 (patch)
tree41c9d6f97e4b73ce862d30f21293a0d70637e4fd
parent13da047628192121db09c1aa5bb2c30f9118f5e1 (diff)
obtain papi only once
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c6
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 030a4aae21..a6c9dd0e29 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,
struct GNUNET_TRANSPORT_PluginFunctions *papi;
struct NeighbourMapEntry *n;
+ papi = GST_plugins_find (blc_ctx->address->transport_name);
+
if ( (NULL == (n = lookup_neighbour (peer))) || (result == GNUNET_NO) ||
- (NULL == (papi = GST_plugins_find (blc_ctx->address->transport_name))) )
+ (NULL == (papi)) )
{
if (NULL == n)
{
@@ -2442,7 +2444,7 @@ switch_address_bl_check_cont (void *cls,
blc_ctx->session,
GNUNET_i2s (&blc_ctx->address->peer));
}
- if (NULL == (papi = GST_plugins_find (blc_ctx->address->transport_name)))
+ if (NULL == papi)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Plugin `%s' for suggested address `%s' session %p for peer `%s' is not available\n",