GNUnet 0.21.2
gnunet-service-reclaim_tickets.h File Reference
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_constants.h"
#include "gnunet_gns_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_reclaim_lib.h"
#include "gnunet_reclaim_service.h"
#include "gnunet_signatures.h"
#include "gnunet_statistics_service.h"
#include "reclaim.h"
Include dependency graph for gnunet-service-reclaim_tickets.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TicketRecordsEntry
 List of tickets. More...
 

Typedefs

typedef void(* RECLAIM_TICKETS_TicketIter) (void *cls, struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri)
 Continuation called with ticket. More...
 
typedef void(* RECLAIM_TICKETS_TicketResult) (void *cls, struct GNUNET_RECLAIM_Ticket *ticket, struct GNUNET_RECLAIM_PresentationList *presentations, int32_t success, const char *emsg)
 Continuation called with ticket. More...
 
typedef void(* RECLAIM_TICKETS_ConsumeCallback) (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_AttributeList *attributes, const struct GNUNET_RECLAIM_PresentationList *presentations, int32_t success, const char *emsg)
 Consume callback. More...
 
typedef void(* RECLAIM_TICKETS_RevokeCallback) (void *cls, int32_t success)
 Revocation callback. More...
 

Functions

struct RECLAIM_TICKETS_RevokeHandleRECLAIM_TICKETS_revoke (const struct GNUNET_RECLAIM_Ticket *ticket, const struct GNUNET_CRYPTO_PrivateKey *identity, RECLAIM_TICKETS_RevokeCallback cb, void *cb_cls)
 Revoke a ticket. More...
 
void RECLAIM_TICKETS_revoke_cancel (struct RECLAIM_TICKETS_RevokeHandle *rh)
 Cancel a revocation. More...
 
struct RECLAIM_TICKETS_ConsumeHandleRECLAIM_TICKETS_consume (const struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri, RECLAIM_TICKETS_ConsumeCallback cb, void *cb_cls)
 Consume a ticket. More...
 
void RECLAIM_TICKETS_consume_cancel (struct RECLAIM_TICKETS_ConsumeHandle *cth)
 Cancel a consume operation. More...
 
void RECLAIM_TICKETS_issue (const struct GNUNET_CRYPTO_PrivateKey *identity, const struct GNUNET_RECLAIM_AttributeList *attrs, const char *rp, RECLAIM_TICKETS_TicketResult cb, void *cb_cls)
 Issue a new reclaim ticket, thereby authorizing the audience to access the set of provided attributes. More...
 
void RECLAIM_TICKETS_iteration_next (struct RECLAIM_TICKETS_Iterator *iter)
 Continue ticket iteration. More...
 
void RECLAIM_TICKETS_iteration_stop (struct RECLAIM_TICKETS_Iterator *iter)
 Stop a running ticket iteration. More...
 
struct RECLAIM_TICKETS_IteratorRECLAIM_TICKETS_iteration_start (const struct GNUNET_CRYPTO_PrivateKey *identity, RECLAIM_TICKETS_TicketIter cb, void *cb_cls)
 Iterate over all tickets issued by an identity. More...
 
int RECLAIM_TICKETS_init (const struct GNUNET_CONFIGURATION_Handle *c)
 Initialize tickets component. More...
 
void RECLAIM_TICKETS_deinit (void)
 Close handles and clean up. More...
 

Typedef Documentation

◆ RECLAIM_TICKETS_TicketIter

typedef void(* RECLAIM_TICKETS_TicketIter) (void *cls, struct GNUNET_RECLAIM_Ticket *ticket, const char *rp_uri)

Continuation called with ticket.

Parameters
clsclosure
ticketthe ticket
rp_urithe RP URI associated with the ticket

Definition at line 107 of file gnunet-service-reclaim_tickets.h.

◆ RECLAIM_TICKETS_TicketResult

typedef void(* RECLAIM_TICKETS_TicketResult) (void *cls, struct GNUNET_RECLAIM_Ticket *ticket, struct GNUNET_RECLAIM_PresentationList *presentations, int32_t success, const char *emsg)

Continuation called with ticket.

Parameters
clsclosure
ticketthe ticket
presentationsnew presentations for ticket (NULL on error)
successGNUNET_SYSERR on failure (including timeout/queue drop/failure to validate) GNUNET_OK on success
emsgNULL on success, otherwise an error message

Definition at line 123 of file gnunet-service-reclaim_tickets.h.

◆ RECLAIM_TICKETS_ConsumeCallback

typedef void(* RECLAIM_TICKETS_ConsumeCallback) (void *cls, const struct GNUNET_CRYPTO_PublicKey *identity, const struct GNUNET_RECLAIM_AttributeList *attributes, const struct GNUNET_RECLAIM_PresentationList *presentations, int32_t success, const char *emsg)

Consume callback.

Parameters
clsclosure
identitythe issuer of the ticket/attributes
attributesattribute list retrieved through ticket
presentationsattribute presentations (may be NULL)
successGNUNET_OK on success
emsgerror message (NULL on success)

Definition at line 141 of file gnunet-service-reclaim_tickets.h.

◆ RECLAIM_TICKETS_RevokeCallback

typedef void(* RECLAIM_TICKETS_RevokeCallback) (void *cls, int32_t success)

Revocation callback.

Parameters
clsclosure
successGNUNET_OK on success

Definition at line 156 of file gnunet-service-reclaim_tickets.h.

Function Documentation

◆ RECLAIM_TICKETS_revoke()

struct RECLAIM_TICKETS_RevokeHandle * RECLAIM_TICKETS_revoke ( const struct GNUNET_RECLAIM_Ticket ticket,
const struct GNUNET_CRYPTO_PrivateKey identity,
RECLAIM_TICKETS_RevokeCallback  cb,
void *  cb_cls 
)

Revoke a ticket.

We start by looking up attribute references in order to change attribute IDs.

Parameters
ticketticket to revoke
identityprivate key of issuer
cbrevocation status callback
cb_clscallback closure
Returns
handle to the operation

Get shared attributes

Definition at line 923 of file gnunet-service-reclaim_tickets.c.

927{
929 char *label;
930 char *tmp;
931
933 rvk->cb = cb;
934 rvk->cb_cls = cb_cls;
935 rvk->identity = *identity;
936 rvk->ticket = *ticket;
938 label = strtok (tmp, ".");
939 GNUNET_assert (NULL != label);
942 identity,
943 label,
945 rvk,
947 rvk);
948 GNUNET_free (tmp);
949 return rvk;
950}
static struct GNUNET_IDENTITY_Handle * identity
Which namespace do we publish to? NULL if we do not publish to a namespace.
static struct GNUNET_RECLAIM_Ticket ticket
Ticket to consume.
static void revoke_attrs_cb(void *cls, const struct GNUNET_CRYPTO_PrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
We found the attribute references.
static struct GNUNET_NAMESTORE_Handle * nsh
static void rvk_attrs_err_cb(void *cls)
Failed to query namestore.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_NAMESTORE_QueueEntry * GNUNET_NAMESTORE_records_lookup(struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *pkey, const char *label, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_NAMESTORE_RecordMonitor rm, void *rm_cls)
Lookup an item in the namestore.
char gns_name[63 *2+2]
The ticket.
Ticket revocation request handle.
struct GNUNET_RECLAIM_Ticket ticket
Ticket to issue.
RECLAIM_TICKETS_RevokeCallback cb
Callback.
struct GNUNET_CRYPTO_PrivateKey identity
Issuer Key.
struct GNUNET_NAMESTORE_QueueEntry * ns_qe
QueueEntry.

References RECLAIM_TICKETS_RevokeHandle::cb, RECLAIM_TICKETS_RevokeHandle::cb_cls, GNUNET_RECLAIM_Ticket::gns_name, GNUNET_assert, GNUNET_free, GNUNET_NAMESTORE_records_lookup(), GNUNET_new, GNUNET_strdup, identity, RECLAIM_TICKETS_RevokeHandle::identity, RECLAIM_TICKETS_RevokeHandle::ns_qe, nsh, revoke_attrs_cb(), rvk_attrs_err_cb(), ticket, and RECLAIM_TICKETS_RevokeHandle::ticket.

Referenced by handle_revoke_ticket_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_revoke_cancel()

void RECLAIM_TICKETS_revoke_cancel ( struct RECLAIM_TICKETS_RevokeHandle rh)

Cancel a revocation.

Parameters
rhhandle to the operation

Definition at line 959 of file gnunet-service-reclaim_tickets.c.

960{
961 GNUNET_assert (NULL != rh);
962 cleanup_rvk (rh);
963}
static void cleanup_rvk(struct RECLAIM_TICKETS_RevokeHandle *rh)
Cleanup revoke handle.

References cleanup_rvk(), and GNUNET_assert.

Referenced by cleanup_client().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_consume()

struct RECLAIM_TICKETS_ConsumeHandle * RECLAIM_TICKETS_consume ( const struct GNUNET_RECLAIM_Ticket ticket,
const char *  rp_uri,
RECLAIM_TICKETS_ConsumeCallback  cb,
void *  cb_cls 
)

Consume a ticket.

We first looking attribute references under the label ticket.rnd in GNS.

Parameters
ticketthe ticket to consume
rp_urithe expected RP URI
cbcallback to call with attributes of ticket
cb_clscallback closure
Returns
handle to the operation

We first looking attribute references under the label ticket.rnd in GNS.

Parameters
idthe audience of the ticket
ticketthe ticket to consume
cbcallback to call with attributes of ticket
cb_clscallback closure
Returns
handle to the operation

Definition at line 1216 of file gnunet-service-reclaim_tickets.c.

1220{
1222
1224
1227 cth->ticket = *ticket;
1228 memcpy (cth->rp_uri, rp_uri, strlen (rp_uri) + 1);
1229 cth->cb = cb;
1230 cth->cb_cls = cb_cls;
1232 cth->lookup_request =
1238 cth);
1239 return cth;
1240}
static struct GNUNET_GNS_Handle * gns
static void lookup_authz_cb(void *cls, int is_gns, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
struct GNUNET_GNS_LookupWithTldRequest * GNUNET_GNS_lookup_with_tld(struct GNUNET_GNS_Handle *handle, const char *name, uint32_t type, enum GNUNET_GNS_LocalOptions options, GNUNET_GNS_LookupResultProcessor2 proc, void *proc_cls)
Perform an asynchronous lookup operation on the GNS, determining the zone using the TLD of the given ...
Definition: gns_tld_api.c:240
@ GNUNET_GNS_LO_DEFAULT
Defaults, look in cache, then in DHT.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:111
#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF
for reclaim records
A list of GNUNET_RECLAIM_Attribute structures.
A list of GNUNET_RECLAIM_Presentation structures.
RECLAIM_TICKETS_ConsumeCallback cb
Callback.
char rp_uri[GNUNET_RECLAIM_TICKET_RP_URI_MAX_LEN]
The ticket audience (= relying party) URI.
struct GNUNET_TIME_Absolute lookup_start_time
Lookup time.
struct GNUNET_RECLAIM_AttributeList * attrs
Attributes.
struct GNUNET_RECLAIM_Ticket ticket
Ticket.
struct GNUNET_GNS_LookupWithTldRequest * lookup_request
LookupRequest.
struct GNUNET_RECLAIM_PresentationList * presentations
Presentations.

References RECLAIM_TICKETS_ConsumeHandle::attrs, RECLAIM_TICKETS_ConsumeHandle::cb, RECLAIM_TICKETS_ConsumeHandle::cb_cls, gns, GNUNET_RECLAIM_Ticket::gns_name, GNUNET_GNS_LO_DEFAULT, GNUNET_GNS_lookup_with_tld(), GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF, GNUNET_new, GNUNET_TIME_absolute_get(), lookup_authz_cb(), RECLAIM_TICKETS_ConsumeHandle::lookup_request, RECLAIM_TICKETS_ConsumeHandle::lookup_start_time, RECLAIM_TICKETS_ConsumeHandle::presentations, RECLAIM_TICKETS_ConsumeHandle::rp_uri, ticket, and RECLAIM_TICKETS_ConsumeHandle::ticket.

Referenced by handle_consume_ticket_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_consume_cancel()

void RECLAIM_TICKETS_consume_cancel ( struct RECLAIM_TICKETS_ConsumeHandle cth)

Cancel a consume operation.

Parameters
cththe operation to cancel

Definition at line 1249 of file gnunet-service-reclaim_tickets.c.

1250{
1251 cleanup_cth (cth);
1252 return;
1253}
static void cleanup_cth(struct RECLAIM_TICKETS_ConsumeHandle *cth)
Cleanup ticket consume handle.

References cleanup_cth().

Referenced by cleanup_client().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_issue()

void RECLAIM_TICKETS_issue ( const struct GNUNET_CRYPTO_PrivateKey identity,
const struct GNUNET_RECLAIM_AttributeList attrs,
const char *  rp,
RECLAIM_TICKETS_TicketResult  cb,
void *  cb_cls 
)

Issue a new reclaim ticket, thereby authorizing the audience to access the set of provided attributes.

Parameters
identitythe issuer
attrsthe attributes to share
rpthe RP URI
cbthe callback to call with the ticket result
cb_clsthe callback closure FIXME: Return handle??
identitythe issuer
attrsthe attributes to share
audiencethe audience to share the attributes with
cbthe callback to call with the ticket result
cb_clsthe callback closure FIXME: Return handle??

Definition at line 1677 of file gnunet-service-reclaim_tickets.c.

1682{
1683 struct TicketIssueHandle *tih;
1684
1685 tih = GNUNET_new (struct TicketIssueHandle);
1686 tih->cb = cb;
1687 tih->cb_cls = cb_cls;
1690 tih->identity = *identity;
1691 memcpy (tih->rp_uri, rp, strlen (rp) + 1);
1692
1693 // First check whether the ticket has already been issued
1694 tih->ns_it =
1696 &tih->identity,
1698 tih,
1700 tih,
1702 tih);
1703}
static char * rp
Relying party.
static void filter_tickets_finished_cb(void *cls)
Done iterating over tickets and we apparently did not find an existing, matching ticket.
static void filter_tickets_cb(void *cls, const struct GNUNET_CRYPTO_PrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
Iterator over records.
static void filter_tickets_error_cb(void *cls)
Namestore error on issue.
struct GNUNET_NAMESTORE_ZoneIterator * GNUNET_NAMESTORE_zone_iteration_start(struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *zone, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
struct GNUNET_RECLAIM_AttributeList * GNUNET_RECLAIM_attribute_list_dup(const struct GNUNET_RECLAIM_AttributeList *attrs)
Make a (deep) copy of a claim list.
Ticket issue request handle.
struct GNUNET_RECLAIM_AttributeList * attrs
Attributes to issue.
struct GNUNET_NAMESTORE_ZoneIterator * ns_it
Namestore Iterator.
struct GNUNET_RECLAIM_PresentationList * presentations
Presentations to add.
RECLAIM_TICKETS_TicketResult cb
Callback.
char rp_uri[GNUNET_RECLAIM_TICKET_RP_URI_MAX_LEN]
The ticket audience (= relying party) URI.
struct GNUNET_CRYPTO_PrivateKey identity
Issuer Key.

References TicketIssueHandle::attrs, TicketIssueHandle::cb, TicketIssueHandle::cb_cls, filter_tickets_cb(), filter_tickets_error_cb(), filter_tickets_finished_cb(), GNUNET_NAMESTORE_zone_iteration_start(), GNUNET_new, GNUNET_RECLAIM_attribute_list_dup(), identity, TicketIssueHandle::identity, TicketIssueHandle::ns_it, nsh, TicketIssueHandle::presentations, rp, and TicketIssueHandle::rp_uri.

Referenced by handle_issue_ticket_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_iteration_next()

void RECLAIM_TICKETS_iteration_next ( struct RECLAIM_TICKETS_Iterator iter)

Continue ticket iteration.

Parameters
iterthe iteration to continue

Definition at line 1802 of file gnunet-service-reclaim_tickets.c.

1803{
1805}
void GNUNET_NAMESTORE_zone_iterator_next(struct GNUNET_NAMESTORE_ZoneIterator *it, uint64_t limit)
Calls the record processor specified in GNUNET_NAMESTORE_zone_iteration_start for the next record.
struct GNUNET_NAMESTORE_ZoneIterator * ns_it
Namestore queue entry.

References GNUNET_NAMESTORE_zone_iterator_next(), and RECLAIM_TICKETS_Iterator::ns_it.

Referenced by handle_ticket_iteration_next().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_iteration_stop()

void RECLAIM_TICKETS_iteration_stop ( struct RECLAIM_TICKETS_Iterator iter)

Stop a running ticket iteration.

Parameters
iteriteration to cancel

Definition at line 1814 of file gnunet-service-reclaim_tickets.c.

1815{
1817 cleanup_iter (iter);
1818}
static void cleanup_iter(struct RECLAIM_TICKETS_Iterator *iter)
Cleanup ticket iterator.
void GNUNET_NAMESTORE_zone_iteration_stop(struct GNUNET_NAMESTORE_ZoneIterator *it)
Stops iteration and releases the namestore handle for further calls.

References cleanup_iter(), GNUNET_NAMESTORE_zone_iteration_stop(), and RECLAIM_TICKETS_Iterator::ns_it.

Referenced by cleanup_client(), and handle_ticket_iteration_stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_iteration_start()

struct RECLAIM_TICKETS_Iterator * RECLAIM_TICKETS_iteration_start ( const struct GNUNET_CRYPTO_PrivateKey identity,
RECLAIM_TICKETS_TicketIter  cb,
void *  cb_cls 
)

Iterate over all tickets issued by an identity.

Parameters
identitythe issuing identity
cbticket callback function
cb_clscallback closure
Returns
a handle to the iteration

Definition at line 1830 of file gnunet-service-reclaim_tickets.c.

1834{
1835 struct RECLAIM_TICKETS_Iterator *iter;
1836
1837 iter = GNUNET_new (struct RECLAIM_TICKETS_Iterator);
1838 iter->cb = cb;
1839 iter->cb_cls = cb_cls;
1840 iter->ns_it =
1842 identity,
1844 iter,
1846 iter,
1848 iter);
1849 return iter;
1850}
static void collect_tickets_finished_cb(void *cls)
Signal ticket iteration has finished.
static void collect_tickets_error_cb(void *cls)
Cancel ticket iteration on namestore error.
static void collect_tickets_cb(void *cls, const struct GNUNET_CRYPTO_PrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd)
Return each record of type GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET to the caller and proceed with the it...
RECLAIM_TICKETS_TicketIter cb
Iter callback.

References RECLAIM_TICKETS_Iterator::cb, RECLAIM_TICKETS_Iterator::cb_cls, collect_tickets_cb(), collect_tickets_error_cb(), collect_tickets_finished_cb(), GNUNET_NAMESTORE_zone_iteration_start(), GNUNET_new, identity, RECLAIM_TICKETS_Iterator::ns_it, and nsh.

Referenced by handle_ticket_iteration_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_init()

int RECLAIM_TICKETS_init ( const struct GNUNET_CONFIGURATION_Handle c)

Initialize tickets component.

Parameters
cthe configuration
Returns
GNUNET_SYSERR on error

Definition at line 1860 of file gnunet-service-reclaim_tickets.c.

1861{
1862 // Get ticket expiration time (relative) from config
1863 if (GNUNET_OK ==
1865 "reclaim",
1866 "TICKET_REFRESH_INTERVAL",
1868 {
1870 "Configured refresh interval for tickets: %s\n",
1872 GNUNET_YES));
1873 }
1874 else
1875 {
1877 }
1878 // Connect to identity and namestore services
1880 if (NULL == nsh)
1881 {
1883 "error connecting to namestore");
1884 return GNUNET_SYSERR;
1885 }
1886 gns = GNUNET_GNS_connect (c);
1887 if (NULL == gns)
1888 {
1889 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "error connecting to gns");
1890 return GNUNET_SYSERR;
1891 }
1892 stats = GNUNET_STATISTICS_create ("reclaim", c);
1893 return GNUNET_OK;
1894}
static struct GNUNET_STATISTICS_Handle * stats
#define DEFAULT_TICKET_REFRESH_INTERVAL
FIXME: the default ticket iteration interval should probably be the minimum attribute expiration.
static struct GNUNET_TIME_Relative ticket_refresh_interval
Ticket expiration interval.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
struct GNUNET_GNS_Handle * GNUNET_GNS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize the connection with the GNS service.
Definition: gns_api.c:267
#define GNUNET_log(kind,...)
@ GNUNET_OK
@ GNUNET_YES
@ GNUNET_SYSERR
#define GNUNET_log_strerror(level, cmd)
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the mess...
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
struct GNUNET_NAMESTORE_Handle * GNUNET_NAMESTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the namestore service.
struct GNUNET_STATISTICS_Handle * GNUNET_STATISTICS_create(const char *subsystem, const struct GNUNET_CONFIGURATION_Handle *cfg)
Get handle for the statistics service.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
Definition: strings.c:570

References DEFAULT_TICKET_REFRESH_INTERVAL, gns, GNUNET_CONFIGURATION_get_value_time(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_GNS_connect(), GNUNET_log, GNUNET_log_strerror, GNUNET_NAMESTORE_connect(), GNUNET_OK, GNUNET_STATISTICS_create(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_SYSERR, GNUNET_YES, nsh, stats, and ticket_refresh_interval.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RECLAIM_TICKETS_deinit()

void RECLAIM_TICKETS_deinit ( void  )

Close handles and clean up.

FIXME: cancel all pending operations (gns, ns etc)

Definition at line 1902 of file gnunet-service-reclaim_tickets.c.

1903{
1904 if (NULL != nsh)
1906 nsh = NULL;
1907 if (NULL != gns)
1909 gns = NULL;
1910 if (NULL != stats)
1911 {
1913 stats = NULL;
1914 }
1915}
void GNUNET_GNS_disconnect(struct GNUNET_GNS_Handle *handle)
Shutdown connection with the GNS service.
Definition: gns_api.c:289
@ GNUNET_NO
void GNUNET_NAMESTORE_disconnect(struct GNUNET_NAMESTORE_Handle *h)
Disconnect from the namestore service (and free associated resources).
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).

References gns, GNUNET_GNS_disconnect(), GNUNET_NAMESTORE_disconnect(), GNUNET_NO, GNUNET_STATISTICS_destroy(), nsh, and stats.

Referenced by cleanup().

Here is the call graph for this function:
Here is the caller graph for this function: