aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-14 13:07:46 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-14 13:07:46 +0000
commit6bbea7ecc4cc9bd1571b10c0530490b25f1762ca (patch)
treed68ec5d47f5af192cdd2887c338a48c82c7737c7 /src/transport/plugin_transport_udp.c
parente80da3ab091fdaaf65222689d10e73ef210b5f23 (diff)
downloadgnunet-6bbea7ecc4cc9bd1571b10c0530490b25f1762ca.tar.gz
gnunet-6bbea7ecc4cc9bd1571b10c0530490b25f1762ca.zip
improved checking for direction
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 8f847b0eb..d5aef62ce 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1444,14 +1444,6 @@ udp_plugin_lookup_session (void *cls,
1444 return NULL ; 1444 return NULL ;
1445} 1445}
1446 1446
1447static int
1448udp_address_is_inbound (const struct GNUNET_HELLO_Address *address)
1449{
1450 if (GNUNET_HELLO_ADDRESS_INFO_INBOUND == (address->local_info & GNUNET_HELLO_ADDRESS_INFO_INBOUND))
1451 return GNUNET_YES;
1452 else
1453 return GNUNET_NO;
1454}
1455 1447
1456static struct Session * 1448static struct Session *
1457udp_plugin_create_session (void *cls, 1449udp_plugin_create_session (void *cls,
@@ -1495,7 +1487,7 @@ udp_plugin_create_session (void *cls,
1495 return NULL ; /* protocol not supported or address invalid */ 1487 return NULL ; /* protocol not supported or address invalid */
1496 LOG(GNUNET_ERROR_TYPE_ERROR, 1488 LOG(GNUNET_ERROR_TYPE_ERROR,
1497 "Creating new %s session %p for peer `%s' address `%s'\n", 1489 "Creating new %s session %p for peer `%s' address `%s'\n",
1498 (GNUNET_YES == udp_address_is_inbound(address)) ? "inbound" : "outbound", 1490 GNUNET_HELLO_address_check_option (address, GNUNET_HELLO_ADDRESS_INFO_INBOUND) ? "inbound" : "outbound",
1499 s, GNUNET_i2s (&address->peer), 1491 s, GNUNET_i2s (&address->peer),
1500 udp_address_to_string(NULL,address->address,address->address_length)); 1492 udp_address_to_string(NULL,address->address,address->address_length));
1501 GNUNET_assert( 1493 GNUNET_assert(