[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 05/06: - fixed some bugs
From: |
gnunet |
Subject: |
[gnunet] 05/06: - fixed some bugs |
Date: |
Mon, 31 Aug 2020 09:40:07 +0200 |
This is an automated email from the git hooks/post-receive script.
t3sserakt pushed a commit to branch master
in repository gnunet.
commit 72cb328c689aacf5a20a0107e5762c1749ea2886
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Fri Aug 28 18:01:10 2020 +0200
- fixed some bugs
---
src/include/gnunet_transport_communication_service.h | 8 ++++++++
src/transport/gnunet-communicator-tcp.c | 12 +++++++++---
src/transport/transport_api2_communication.c | 15 ++++++++++++++-
3 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/src/include/gnunet_transport_communication_service.h
b/src/include/gnunet_transport_communication_service.h
index ea6b95e2d..431b9a671 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -336,6 +336,14 @@ void
GNUNET_TRANSPORT_communicator_address_remove (
struct GNUNET_TRANSPORT_AddressIdentifier *ai);
+/**
+ * Notify transport service that this communicator no longer provides all its
addresses for this peer.
+ *
+ * @param ch The communicator handle.
+ */
+void
+GNUNET_TRANSPORT_communicator_address_remove_all (
+ struct
GNUNET_TRANSPORT_CommunicatorHandle *ch);
/**
* The communicator asks the transport service to route a message via
diff --git a/src/transport/gnunet-communicator-tcp.c
b/src/transport/gnunet-communicator-tcp.c
index 1783edb91..4caef909c 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -2944,6 +2944,10 @@ static void
do_shutdown (void *cls)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Shutdown %s!\n",
+ shutdown_running ? "running" : "not running");
+
if (GNUNET_YES == shutdown_running)
return;
else
@@ -2958,6 +2962,7 @@ do_shutdown (void *cls)
}
GNUNET_CONTAINER_multipeermap_iterate (queue_map, &get_queue_delete_it,
NULL);
GNUNET_CONTAINER_multipeermap_destroy (queue_map);
+ GNUNET_TRANSPORT_communicator_address_remove_all (ch);
if (NULL != ch)
{
GNUNET_TRANSPORT_communicator_disconnect (ch);
@@ -3038,8 +3043,9 @@ nat_address_cb (void *cls,
char *my_addr;
struct GNUNET_TRANSPORT_AddressIdentifier *ai;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "nat address cb %s\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "nat address cb %s %s\n",
+ add_remove ? "add" : "remove",
GNUNET_a2s (addr, addrlen));
if (GNUNET_YES == add_remove)
@@ -3162,7 +3168,7 @@ init_socket (struct sockaddr *addr,
sto_len = in_len;
}
- addr = (struct sockaddr *) &in_sto;
+ //addr = (struct sockaddr *) &in_sto;
in_len = sto_len;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Bound to `%s'\n",
diff --git a/src/transport/transport_api2_communication.c
b/src/transport/transport_api2_communication.c
index d1e28cc36..b048ad851 100644
--- a/src/transport/transport_api2_communication.c
+++ b/src/transport/transport_api2_communication.c
@@ -1081,7 +1081,6 @@ GNUNET_TRANSPORT_communicator_address_add (
return ai;
}
-
/**
* Notify transport service about an address that this communicator no
* longer provides for this peer.
@@ -1100,6 +1099,20 @@ GNUNET_TRANSPORT_communicator_address_remove (
GNUNET_free (ai);
}
+/**
+ * Notify transport service that this communicator no longer provides all its
addresses for this peer.
+ *
+ * @param ch The communicator handle.
+ */
+void
+GNUNET_TRANSPORT_communicator_address_remove_all (
+ struct
GNUNET_TRANSPORT_CommunicatorHandle *ch)
+{
+ for (struct GNUNET_TRANSPORT_AddressIdentifier *ai = ch->ai_head; NULL != ai;
+ ai = ai->next)
+ GNUNET_TRANSPORT_communicator_address_remove (ai);
+}
+
/* ************************* Backchannel *************************** */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (38e90f057 -> 4887fa044), gnunet, 2020/08/31
- [gnunet] 02/06: Merge branch 'master' of ssh://gnunet.org/gnunet, gnunet, 2020/08/31
- [gnunet] 05/06: - fixed some bugs,
gnunet <=
- [gnunet] 03/06: - fixed some bugs, gnunet, 2020/08/31
- [gnunet] 06/06: Merge branch 'master' of ssh://gnunet.org/gnunet, gnunet, 2020/08/31
- [gnunet] 04/06: Merge branch 'master' of ssh://gnunet.org/gnunet, gnunet, 2020/08/31
- [gnunet] 01/06: - fixed tcp communicator rekey, gnunet, 2020/08/31