X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnamecache%2Fnamecache_api.c;h=288d53b19d4d563f5df6152ac2b6ba9c3db47e2b;hb=56c021a3748c30b93e4ac3a03b6dc685400960d4;hp=f3e78061d8f08dff3d5144d05dd58c1ed499ebb8;hpb=dbc823a07a03e1085172038125b0edf15b0dc6fe;p=oweals%2Fgnunet.git diff --git a/src/namecache/namecache_api.c b/src/namecache/namecache_api.c index f3e78061d..288d53b19 100644 --- a/src/namecache/namecache_api.c +++ b/src/namecache/namecache_api.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2010-2013 Christian Grothoff (and other contributing authors) + Copyright (C) 2010-2013 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /** @@ -34,7 +34,6 @@ #include "gnunet_gnsrecord_lib.h" #include "gnunet_signatures.h" #include "gnunet_namecache_service.h" -#include "gnunet_namestore_service.h" #include "namecache.h" @@ -160,7 +159,7 @@ struct GNUNET_NAMECACHE_Handle /** * Reconnect task */ - GNUNET_SCHEDULER_TaskIdentifier reconnect_task; + struct GNUNET_SCHEDULER_Task * reconnect_task; /** * Delay introduced before we reconnect. @@ -272,8 +271,8 @@ handle_block_cache_response (struct GNUNET_NAMECACHE_QueueEntry *qe, if (NULL != qe->cont) qe->cont (qe->cont_cls, res, - (GNUNET_OK == res) ? - NULL + (GNUNET_OK == res) + ? NULL : _("Namecache failed to cache block")); return GNUNET_OK; } @@ -504,7 +503,7 @@ reconnect_task (void *cls, { struct GNUNET_NAMECACHE_Handle *h = cls; - h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; + h->reconnect_task = NULL; reconnect (h); } @@ -602,10 +601,10 @@ GNUNET_NAMECACHE_disconnect (struct GNUNET_NAMECACHE_Handle *h) GNUNET_CLIENT_disconnect (h->client); h->client = NULL; } - if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task) + if (NULL != h->reconnect_task) { GNUNET_SCHEDULER_cancel (h->reconnect_task); - h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; + h->reconnect_task = NULL; } GNUNET_free (h); } @@ -691,8 +690,6 @@ GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h, size_t msg_size; uint32_t rid; - GNUNET_assert (NULL != h); - GNUNET_assert (NULL != derived_hash); LOG (GNUNET_ERROR_TYPE_DEBUG, "Looking for block under %s\n", GNUNET_h2s (derived_hash));