diff options
author | t3sserakt <t3ss@posteo.de> | 2020-08-28 18:01:10 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-08-28 18:01:10 +0200 |
commit | 72cb328c689aacf5a20a0107e5762c1749ea2886 (patch) | |
tree | 7514cda26e79f3663f093dddc1910c36258aad3b /src/transport | |
parent | 2b552a5f5e85fab1c14af73735c0de61b46cc3dc (diff) | |
download | gnunet-72cb328c689aacf5a20a0107e5762c1749ea2886.tar.gz gnunet-72cb328c689aacf5a20a0107e5762c1749ea2886.zip |
- fixed some bugs
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-communicator-tcp.c | 12 | ||||
-rw-r--r-- | src/transport/transport_api2_communication.c | 15 |
2 files changed, 23 insertions, 4 deletions
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 | |||
2944 | do_shutdown (void *cls) | 2944 | do_shutdown (void *cls) |
2945 | { | 2945 | { |
2946 | 2946 | ||
2947 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2948 | "Shutdown %s!\n", | ||
2949 | shutdown_running ? "running" : "not running"); | ||
2950 | |||
2947 | if (GNUNET_YES == shutdown_running) | 2951 | if (GNUNET_YES == shutdown_running) |
2948 | return; | 2952 | return; |
2949 | else | 2953 | else |
@@ -2958,6 +2962,7 @@ do_shutdown (void *cls) | |||
2958 | } | 2962 | } |
2959 | GNUNET_CONTAINER_multipeermap_iterate (queue_map, &get_queue_delete_it, NULL); | 2963 | GNUNET_CONTAINER_multipeermap_iterate (queue_map, &get_queue_delete_it, NULL); |
2960 | GNUNET_CONTAINER_multipeermap_destroy (queue_map); | 2964 | GNUNET_CONTAINER_multipeermap_destroy (queue_map); |
2965 | GNUNET_TRANSPORT_communicator_address_remove_all (ch); | ||
2961 | if (NULL != ch) | 2966 | if (NULL != ch) |
2962 | { | 2967 | { |
2963 | GNUNET_TRANSPORT_communicator_disconnect (ch); | 2968 | GNUNET_TRANSPORT_communicator_disconnect (ch); |
@@ -3038,8 +3043,9 @@ nat_address_cb (void *cls, | |||
3038 | char *my_addr; | 3043 | char *my_addr; |
3039 | struct GNUNET_TRANSPORT_AddressIdentifier *ai; | 3044 | struct GNUNET_TRANSPORT_AddressIdentifier *ai; |
3040 | 3045 | ||
3041 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3046 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3042 | "nat address cb %s\n", | 3047 | "nat address cb %s %s\n", |
3048 | add_remove ? "add" : "remove", | ||
3043 | GNUNET_a2s (addr, addrlen)); | 3049 | GNUNET_a2s (addr, addrlen)); |
3044 | 3050 | ||
3045 | if (GNUNET_YES == add_remove) | 3051 | if (GNUNET_YES == add_remove) |
@@ -3162,7 +3168,7 @@ init_socket (struct sockaddr *addr, | |||
3162 | sto_len = in_len; | 3168 | sto_len = in_len; |
3163 | } | 3169 | } |
3164 | 3170 | ||
3165 | addr = (struct sockaddr *) &in_sto; | 3171 | //addr = (struct sockaddr *) &in_sto; |
3166 | in_len = sto_len; | 3172 | in_len = sto_len; |
3167 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3173 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3168 | "Bound to `%s'\n", | 3174 | "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 ( | |||
1081 | return ai; | 1081 | return ai; |
1082 | } | 1082 | } |
1083 | 1083 | ||
1084 | |||
1085 | /** | 1084 | /** |
1086 | * Notify transport service about an address that this communicator no | 1085 | * Notify transport service about an address that this communicator no |
1087 | * longer provides for this peer. | 1086 | * longer provides for this peer. |
@@ -1100,6 +1099,20 @@ GNUNET_TRANSPORT_communicator_address_remove ( | |||
1100 | GNUNET_free (ai); | 1099 | GNUNET_free (ai); |
1101 | } | 1100 | } |
1102 | 1101 | ||
1102 | /** | ||
1103 | * Notify transport service that this communicator no longer provides all its addresses for this peer. | ||
1104 | * | ||
1105 | * @param ch The communicator handle. | ||
1106 | */ | ||
1107 | void | ||
1108 | GNUNET_TRANSPORT_communicator_address_remove_all ( | ||
1109 | struct GNUNET_TRANSPORT_CommunicatorHandle *ch) | ||
1110 | { | ||
1111 | for (struct GNUNET_TRANSPORT_AddressIdentifier *ai = ch->ai_head; NULL != ai; | ||
1112 | ai = ai->next) | ||
1113 | GNUNET_TRANSPORT_communicator_address_remove (ai); | ||
1114 | } | ||
1115 | |||
1103 | 1116 | ||
1104 | /* ************************* Backchannel *************************** */ | 1117 | /* ************************* Backchannel *************************** */ |
1105 | 1118 | ||