aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api2_communication.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api2_communication.c')
-rw-r--r--src/transport/transport_api2_communication.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/transport/transport_api2_communication.c b/src/transport/transport_api2_communication.c
index b79f0d8bf..079982ca5 100644
--- a/src/transport/transport_api2_communication.c
+++ b/src/transport/transport_api2_communication.c
@@ -1048,21 +1048,10 @@ GNUNET_TRANSPORT_communicator_address_remove (
1048 struct GNUNET_TRANSPORT_CommunicatorHandle *ch = ai->ch; 1048 struct GNUNET_TRANSPORT_CommunicatorHandle *ch = ai->ch;
1049 1049
1050 send_del_address (ai); 1050 send_del_address (ai);
1051 if (NULL == ai->prev)
1052 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1053 "prev null\n");
1054 if (ch->ai_head == ai)
1055 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1056 "equals head\n");
1057 if (NULL == ai->next)
1058 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1059 "next null\n");
1060 if (ch->ai_tail == ai)
1061 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1062 "equals tail\n");
1063 GNUNET_CONTAINER_DLL_remove (ch->ai_head, ch->ai_tail, ai); 1051 GNUNET_CONTAINER_DLL_remove (ch->ai_head, ch->ai_tail, ai);
1064 GNUNET_free (ai->address); 1052 GNUNET_free (ai->address);
1065 GNUNET_free (ai); 1053 GNUNET_free (ai);
1054 ai = NULL;
1066} 1055}
1067 1056
1068/** 1057/**
@@ -1074,9 +1063,13 @@ void
1074GNUNET_TRANSPORT_communicator_address_remove_all ( 1063GNUNET_TRANSPORT_communicator_address_remove_all (
1075 struct GNUNET_TRANSPORT_CommunicatorHandle *ch) 1064 struct GNUNET_TRANSPORT_CommunicatorHandle *ch)
1076{ 1065{
1077 for (struct GNUNET_TRANSPORT_AddressIdentifier *ai = ch->ai_head; NULL != ai; 1066 struct GNUNET_TRANSPORT_AddressIdentifier *ai = ch->ai_head;
1078 ai = ai->next) 1067 while (NULL != ai)
1068 {
1069 struct GNUNET_TRANSPORT_AddressIdentifier *ai_next = ai->next;
1079 GNUNET_TRANSPORT_communicator_address_remove (ai); 1070 GNUNET_TRANSPORT_communicator_address_remove (ai);
1071 ai = ai_next;
1072 }
1080} 1073}
1081 1074
1082 1075