/*
This file is part of GNUnet.
- Copyright (C) 2008--2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2008--2015 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* Expire a #PooledConnection object
*
* @param cls the #PooledConnection object
- * @param tc scheduler task context
*/
static void
-expire (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+expire (void *cls)
{
struct PooledConnection *entry = cls;
* further schedules itself if there are similar waiting objects which can be notified.
*
* @param cls the #PooledConnection object
- * @param tc the task context from scheduler
*/
static void
-connection_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+connection_ready (void *cls)
{
struct PooledConnection *entry = cls;
struct GST_ConnectionPool_GetHandle *gh;
{
struct PooledConnection *entry;
+ if (NULL == gh)
+ return;
entry = gh->entry;
LOG_DEBUG ("Cleaning up get handle %p for service %u, peer %u\n",
gh,
gh->service, entry->index);
- if (!gh->connection_ready_called)
+ if (! gh->connection_ready_called)
{
- GNUNET_CONTAINER_DLL_remove (entry->head_waiting, entry->tail_waiting, gh);
- if ( (NULL == search_waiting (entry, entry->head_waiting))
- && (NULL != entry->notify_task) )
+ GNUNET_CONTAINER_DLL_remove (entry->head_waiting,
+ entry->tail_waiting,
+ gh);
+ if ( (NULL == search_waiting (entry, entry->head_waiting)) &&
+ (NULL != entry->notify_task) )
{
GNUNET_SCHEDULER_cancel (entry->notify_task);
entry->notify_task = NULL;
}
if (gh->notify_waiting)
{
- GNUNET_CONTAINER_DLL_remove (entry->head_notify, entry->tail_notify, gh);
+ GNUNET_CONTAINER_DLL_remove (entry->head_notify,
+ entry->tail_notify,
+ gh);
gh->notify_waiting = 0;
}
GNUNET_free (gh);
gh = NULL;
- GNUNET_assert (!entry->in_lru);
- if (!entry->in_pool)
- GNUNET_CONTAINER_DLL_remove (head_not_pooled, tail_not_pooled, entry);
+ GNUNET_assert (! entry->in_lru);
+ if (! entry->in_pool)
+ GNUNET_CONTAINER_DLL_remove (head_not_pooled,
+ tail_not_pooled,
+ entry);
if (NULL != map)
{
if (GNUNET_YES == GNUNET_CONTAINER_multihashmap32_contains (map,