aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed_connectionpool.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-27 16:04:58 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-27 16:04:58 +0000
commit2aee8da94c5aee59e4ffe2ce4ac9f0c984c4d570 (patch)
tree4ab489ffbe1820a1e871a169fd12c1da784b860d /src/testbed/gnunet-service-testbed_connectionpool.c
parent94ac243261c531a8f9214645b387fe9e0bb33760 (diff)
downloadgnunet-2aee8da94c5aee59e4ffe2ce4ac9f0c984c4d570.tar.gz
gnunet-2aee8da94c5aee59e4ffe2ce4ac9f0c984c4d570.zip
stop using deprecated TRANSPORT_try_connect() API, use modern ATS connectivity suggestions instead
Diffstat (limited to 'src/testbed/gnunet-service-testbed_connectionpool.c')
-rw-r--r--src/testbed/gnunet-service-testbed_connectionpool.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/testbed/gnunet-service-testbed_connectionpool.c b/src/testbed/gnunet-service-testbed_connectionpool.c
index 4ca13ed42..3e21f9632 100644
--- a/src/testbed/gnunet-service-testbed_connectionpool.c
+++ b/src/testbed/gnunet-service-testbed_connectionpool.c
@@ -975,15 +975,19 @@ GST_connection_pool_get_handle_done (struct GST_ConnectionPool_GetHandle *gh)
975{ 975{
976 struct PooledConnection *entry; 976 struct PooledConnection *entry;
977 977
978 if (NULL == gh)
979 return;
978 entry = gh->entry; 980 entry = gh->entry;
979 LOG_DEBUG ("Cleaning up get handle %p for service %u, peer %u\n", 981 LOG_DEBUG ("Cleaning up get handle %p for service %u, peer %u\n",
980 gh, 982 gh,
981 gh->service, entry->index); 983 gh->service, entry->index);
982 if (!gh->connection_ready_called) 984 if (! gh->connection_ready_called)
983 { 985 {
984 GNUNET_CONTAINER_DLL_remove (entry->head_waiting, entry->tail_waiting, gh); 986 GNUNET_CONTAINER_DLL_remove (entry->head_waiting,
985 if ( (NULL == search_waiting (entry, entry->head_waiting)) 987 entry->tail_waiting,
986 && (NULL != entry->notify_task) ) 988 gh);
989 if ( (NULL == search_waiting (entry, entry->head_waiting)) &&
990 (NULL != entry->notify_task) )
987 { 991 {
988 GNUNET_SCHEDULER_cancel (entry->notify_task); 992 GNUNET_SCHEDULER_cancel (entry->notify_task);
989 entry->notify_task = NULL; 993 entry->notify_task = NULL;
@@ -991,14 +995,18 @@ GST_connection_pool_get_handle_done (struct GST_ConnectionPool_GetHandle *gh)
991 } 995 }
992 if (gh->notify_waiting) 996 if (gh->notify_waiting)
993 { 997 {
994 GNUNET_CONTAINER_DLL_remove (entry->head_notify, entry->tail_notify, gh); 998 GNUNET_CONTAINER_DLL_remove (entry->head_notify,
999 entry->tail_notify,
1000 gh);
995 gh->notify_waiting = 0; 1001 gh->notify_waiting = 0;
996 } 1002 }
997 GNUNET_free (gh); 1003 GNUNET_free (gh);
998 gh = NULL; 1004 gh = NULL;
999 GNUNET_assert (!entry->in_lru); 1005 GNUNET_assert (! entry->in_lru);
1000 if (!entry->in_pool) 1006 if (! entry->in_pool)
1001 GNUNET_CONTAINER_DLL_remove (head_not_pooled, tail_not_pooled, entry); 1007 GNUNET_CONTAINER_DLL_remove (head_not_pooled,
1008 tail_not_pooled,
1009 entry);
1002 if (NULL != map) 1010 if (NULL != map)
1003 { 1011 {
1004 if (GNUNET_YES == GNUNET_CONTAINER_multihashmap32_contains (map, 1012 if (GNUNET_YES == GNUNET_CONTAINER_multihashmap32_contains (map,