GNUnet 0.22.0
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 925 of file gnunet-service-reclaim_tickets.c.

929{
931 char *label;
932 char *tmp;
933
935 rvk->cb = cb;
936 rvk->cb_cls = cb_cls;
937 rvk->identity = *identity;
938 rvk->ticket = *ticket;
940 label = strtok (tmp, ".");
941 GNUNET_assert (NULL != label);
944 identity,
945 label,
947 rvk,
949 rvk);
950 GNUNET_free (tmp);
951 return rvk;
952}
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 961 of file gnunet-service-reclaim_tickets.c.

962{
963 GNUNET_assert (NULL != rh);
964 cleanup_rvk (rh);
965}
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 1218 of file gnunet-service-reclaim_tickets.c.

1222{
1224
1226
1229 cth->ticket = *ticket;
1230 memcpy (cth->rp_uri, rp_uri, strlen (rp_uri) + 1);
1231 cth->cb = cb;
1232 cth->cb_cls = cb_cls;
1234 cth->lookup_request =
1240 cth);
1241 return cth;
1242}
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 1251 of file gnunet-service-reclaim_tickets.c.

1252{
1253 cleanup_cth (cth);
1254 return;
1255}
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 1686 of file gnunet-service-reclaim_tickets.c.

1691{
1692 struct TicketIssueHandle *tih;
1693
1694 tih = GNUNET_new (struct TicketIssueHandle);
1695 tih->cb = cb;
1696 tih->cb_cls = cb_cls;
1699 tih->identity = *identity;
1700 memcpy (tih->rp_uri, rp, strlen (rp) + 1);
1701
1702 // First check whether the ticket has already been issued
1703 tih->ns_it =
1705 &tih->identity,
1707 tih,
1709 tih,
1711 tih);
1712}
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 1811 of file gnunet-service-reclaim_tickets.c.

1812{
1814}
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 1823 of file gnunet-service-reclaim_tickets.c.

1824{
1826 cleanup_iter (iter);
1827}
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 1839 of file gnunet-service-reclaim_tickets.c.

1843{
1844 struct RECLAIM_TICKETS_Iterator *iter;
1845
1846 iter = GNUNET_new (struct RECLAIM_TICKETS_Iterator);
1847 iter->cb = cb;
1848 iter->cb_cls = cb_cls;
1849 iter->ns_it =
1851 identity,
1853 iter,
1855 iter,
1857 iter);
1858 return iter;
1859}
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 1869 of file gnunet-service-reclaim_tickets.c.

1870{
1871 // Get ticket expiration time (relative) from config
1872 if (GNUNET_OK ==
1874 "reclaim",
1875 "TICKET_REFRESH_INTERVAL",
1877 {
1879 "Configured refresh interval for tickets: %s\n",
1881 GNUNET_YES));
1882 }
1883 else
1884 {
1886 }
1887 // Connect to identity and namestore services
1889 if (NULL == nsh)
1890 {
1892 "error connecting to namestore");
1893 return GNUNET_SYSERR;
1894 }
1895 gns = GNUNET_GNS_connect (c);
1896 if (NULL == gns)
1897 {
1898 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "error connecting to gns");
1899 return GNUNET_SYSERR;
1900 }
1901 stats = GNUNET_STATISTICS_create ("reclaim", c);
1902 return GNUNET_OK;
1903}
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:579

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 1911 of file gnunet-service-reclaim_tickets.c.

1912{
1913 if (NULL != nsh)
1915 nsh = NULL;
1916 if (NULL != gns)
1918 gns = NULL;
1919 if (NULL != stats)
1920 {
1922 stats = NULL;
1923 }
1924}
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: