diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-14 13:07:46 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-14 13:07:46 +0000 |
commit | 6bbea7ecc4cc9bd1571b10c0530490b25f1762ca (patch) | |
tree | d68ec5d47f5af192cdd2887c338a48c82c7737c7 /src/transport/plugin_transport_udp.c | |
parent | e80da3ab091fdaaf65222689d10e73ef210b5f23 (diff) | |
download | gnunet-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.c | 10 |
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 | ||
1447 | static int | ||
1448 | udp_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 | ||
1456 | static struct Session * | 1448 | static struct Session * |
1457 | udp_plugin_create_session (void *cls, | 1449 | udp_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( |