X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgns%2Fgns_api.c;h=ff67f0205250f1b941b55c6608f788e59534bb4d;hb=5f59decb7b7d40f7b478abbc26d2cf15f1a140ae;hp=84c4ae189f3ee760450062b39309285fbfc67be4;hpb=ae3380b0cc18e3d06631aa5fec348f5dc5a940c9;p=oweals%2Fgnunet.git diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 84c4ae189..ff67f0205 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2009-2013, 2016 GNUnet e.V. + Copyright (C) 2009-2013, 2016, 2018 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 @@ -31,7 +31,7 @@ #include "gnunet_protocols.h" #include "gnunet_dht_service.h" #include "gns.h" -#include "gnunet_gns_service.h" +#include "gns_api.h" #define LOG(kind,...) GNUNET_log_from (kind, "gns-api",__VA_ARGS__) @@ -80,50 +80,6 @@ struct GNUNET_GNS_LookupRequest }; -/** - * Connection to the GNS service. - */ -struct GNUNET_GNS_Handle -{ - - /** - * Configuration to use. - */ - const struct GNUNET_CONFIGURATION_Handle *cfg; - - /** - * Connection to service (if available). - */ - struct GNUNET_MQ_Handle *mq; - - /** - * Head of linked list of active lookup requests. - */ - struct GNUNET_GNS_LookupRequest *lookup_head; - - /** - * Tail of linked list of active lookup requests. - */ - struct GNUNET_GNS_LookupRequest *lookup_tail; - - /** - * Reconnect task - */ - struct GNUNET_SCHEDULER_Task *reconnect_task; - - /** - * How long do we wait until we try to reconnect? - */ - struct GNUNET_TIME_Relative reconnect_backoff; - - /** - * Request Id generator. Incremented by one for each request. - */ - uint32_t r_id_gen; - -}; - - /** * Reconnect to GNS service. * @@ -201,7 +157,8 @@ check_result (void *cls, size_t mlen = ntohs (lookup_msg->header.size) - sizeof (*lookup_msg); uint32_t rd_count = ntohl (lookup_msg->rd_count); struct GNUNET_GNSRECORD_Data rd[rd_count]; - + + (void) cls; if (GNUNET_SYSERR == GNUNET_GNSRECORD_records_deserialize (mlen, (const char*) &lookup_msg[1], @@ -423,4 +380,5 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, return lr; } + /* end of gns_api.c */