gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-developers] [PATCH] transport_tcp: make use of GNUNET_HELLO_addr


From: Daniel Golle
Subject: [GNUnet-developers] [PATCH] transport_tcp: make use of GNUNET_HELLO_address_check_option
Date: Thu, 12 May 2016 14:52:49 +0100
User-agent: Mutt/1.6.1 (2016-04-27)

Spotted this while reviewing HELLO and its users.
I guess this this was probably forgotten earlier, however, I hestitate
to commit it, so please have a look at my suggestion:
---
 src/transport/plugin_transport_tcp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/transport/plugin_transport_tcp.c 
b/src/transport/plugin_transport_tcp.c
index b1c68ac..2d92b25 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -545,9 +545,8 @@ notify_session_monitor (struct Plugin *plugin,
     return;
   memset (&info, 0, sizeof (info));
   info.state = state;
-  info.is_inbound = (0 != (GNUNET_HELLO_ADDRESS_INFO_INBOUND & 
session->address->local_info))
-    ? GNUNET_YES
-    : GNUNET_NO;
+  info.is_inbound = GNUNET_HELLO_address_check_option (session->address,
+                                         GNUNET_HELLO_ADDRESS_INFO_INBOUND)
   info.num_msg_pending = session->msgs_in_queue;
   info.num_bytes_pending = session->bytes_in_queue;
   if (NULL != session->receive_delay_task)
-- 
2.8.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]