GNUnet 0.21.1
peerstore_api.c File Reference

API for peerstore. More...

#include "gnunet_time_lib.h"
#include "platform.h"
#include "gnunet_common.h"
#include "gnunet_protocols.h"
#include "gnunet_util_lib.h"
#include "gnunet_hello_uri_lib.h"
#include "peerstore.h"
#include "peerstore_common.h"
#include "gnunet_peerstore_service.h"
Include dependency graph for peerstore_api.c:

Go to the source code of this file.

Data Structures

struct  GNUNET_PEERSTORE_Handle
 Handle to the PEERSTORE service. More...
 
struct  GNUNET_PEERSTORE_StoreHelloContext
 Context for a add hello uri request. More...
 
struct  GNUNET_PEERSTORE_StoreContext
 Context for a store request. More...
 
struct  StoreHelloCls
 Closure for store callback when storing hello uris. More...
 
struct  GNUNET_PEERSTORE_IterateContext
 Context for a iterate request. More...
 
struct  GNUNET_PEERSTORE_NotifyContext
 Context for the info handler. More...
 

Macros

#define LOG(kind, ...)   GNUNET_log_from (kind, "peerstore-api", __VA_ARGS__)
 

Functions

static void reconnect (void *cls)
 Close the existing connection to PEERSTORE and reconnect. More...
 
static uint32_t get_op_id (struct GNUNET_PEERSTORE_Handle *h)
 Get a fresh operation id to distinguish between namestore requests. More...
 
static void disconnect (struct GNUNET_PEERSTORE_Handle *h)
 Disconnect from the peerstore service. More...
 
static void disconnect_and_schedule_reconnect (struct GNUNET_PEERSTORE_Handle *h)
 Function that will schedule the job that will try to connect us again to the client. More...
 
static void handle_client_error (void *cls, enum GNUNET_MQ_Error error)
 Function called when we had trouble talking to the service. More...
 
struct GNUNET_PEERSTORE_HandleGNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Connect to the PEERSTORE service. More...
 
void GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h)
 Disconnect from the PEERSTORE service. More...
 
void GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc)
 Cancel a store request. More...
 
struct GNUNET_PEERSTORE_StoreContextGNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
 Store a new entry in the PEERSTORE. More...
 
static void handle_store_result (void *cls, const struct PeerstoreResultMessage *msg)
 When a response for store request is received. More...
 
static void handle_iterate_end (void *cls, const struct PeerstoreResultMessage *msg)
 When a response for iterate request is received. More...
 
static int check_iterate_result (void *cls, const struct PeerstoreRecordMessage *msg)
 When a response for iterate request is received, check the message is well-formed. More...
 
static void handle_iterate_result (void *cls, const struct PeerstoreRecordMessage *msg)
 When a response for iterate request is received. More...
 
void GNUNET_PEERSTORE_iteration_next (struct GNUNET_PEERSTORE_IterateContext *ic, uint64_t limit)
 Cancel an iterate request Please do not call after the iterate request is done. More...
 
void GNUNET_PEERSTORE_iteration_stop (struct GNUNET_PEERSTORE_IterateContext *ic)
 Cancel an iterate request Please do not call after the iterate request is done. More...
 
struct GNUNET_PEERSTORE_IterateContextGNUNET_PEERSTORE_iteration_start (struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_PEERSTORE_Processor callback, void *callback_cls)
 Iterate over peerstore entries. More...
 
static void hello_store_success (void *cls, int success)
 
static void hello_add_iter (void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
 
struct GNUNET_PEERSTORE_StoreHelloContextGNUNET_PEERSTORE_hello_add (struct GNUNET_PEERSTORE_Handle *h, const struct GNUNET_MessageHeader *msg, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
 Add hello to peerstore. More...
 
void GNUNET_PEERSTORE_hello_add_cancel (struct GNUNET_PEERSTORE_StoreHelloContext *huc)
 Cancel the request to add a hello. More...
 

Detailed Description

API for peerstore.

Author
Omar Tarabai
Christian Grothoff
Martin Schanzenbach

Definition in file peerstore_api.c.

Macro Definition Documentation

◆ LOG

#define LOG (   kind,
  ... 
)    GNUNET_log_from (kind, "peerstore-api", __VA_ARGS__)

Definition at line 36 of file peerstore_api.c.

Function Documentation

◆ reconnect()

static void reconnect ( void *  cls)
static

Close the existing connection to PEERSTORE and reconnect.

Parameters
clsa struct GNUNET_PEERSTORE_Handle *h
clsa struct GNUNET_PEERSTORE_Handle *

Definition at line 791 of file peerstore_api.c.

792{
793 struct GNUNET_PEERSTORE_Handle *h = cls;
794 struct GNUNET_MQ_MessageHandler mq_handlers[] = {
795 GNUNET_MQ_hd_fixed_size (iterate_end,
798 h),
799 GNUNET_MQ_hd_fixed_size (store_result,
802 h),
803 GNUNET_MQ_hd_var_size (iterate_result,
806 h),
808 };
809
810 h->reconnect_task = NULL;
811 LOG (GNUNET_ERROR_TYPE_DEBUG, "Reconnecting...\n");
813 "peerstore",
814 mq_handlers,
816 h);
817 if (NULL == h->mq)
818 {
820 GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
821 h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);
822 return;
823 }
825 "Resending pending requests after reconnect.\n");
826 for (struct GNUNET_PEERSTORE_IterateContext *ic = h->iterate_head; NULL != ic;
827 ic = ic->next)
828 {
829 GNUNET_MQ_send (h->mq, ic->env);
830 }
831 for (struct GNUNET_PEERSTORE_StoreContext *sc = h->store_head; NULL != sc;
832 sc = sc->next)
833 {
834 GNUNET_MQ_send (h->mq, sc->env);
835 }
836}
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:99
static struct GNUNET_FS_SearchContext * sc
Definition: gnunet-search.c:87
struct GNUNET_MQ_Handle * GNUNET_CLIENT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name, const struct GNUNET_MQ_MessageHandler *handlers, GNUNET_MQ_ErrorHandler error_handler, void *error_handler_cls)
Create a message queue to connect to a GNUnet service.
Definition: client.c:1057
@ GNUNET_ERROR_TYPE_DEBUG
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:304
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
#define GNUNET_MESSAGE_TYPE_PEERSTORE_RECORD
Record result message.
#define GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END
Iteration end message.
#define GNUNET_MESSAGE_TYPE_PEERSTORE_STORE_RESULT
Store result message.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1272
#define GNUNET_TIME_STD_BACKOFF(r)
Perform our standard exponential back-off calculation, starting at 1 ms and then going by a factor of...
static void handle_client_error(void *cls, enum GNUNET_MQ_Error error)
Function called when we had trouble talking to the service.
static void reconnect(void *cls)
Close the existing connection to PEERSTORE and reconnect.
#define LOG(kind,...)
Definition: peerstore_api.c:36
struct GNUNET_MQ_Handle * mq
Our connection to the ARM service.
Definition: arm_api.c:107
const struct GNUNET_CONFIGURATION_Handle * cfg
The configuration that we are using.
Definition: arm_api.c:112
struct GNUNET_SCHEDULER_Task * reconnect_task
ID of the reconnect task (if any).
Definition: arm_api.c:147
Message handler for a specific message type.
Handle to the PEERSTORE service.
Definition: peerstore_api.c:46
Context for a iterate request.
Context for a store request.
Message carrying a PEERSTORE record message.
Definition: peerstore.h:38
Message carrying a PEERSTORE result message.
Definition: peerstore.h:96

References GNUNET_ARM_Handle::cfg, GNUNET_CLIENT_connect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END, GNUNET_MESSAGE_TYPE_PEERSTORE_RECORD, GNUNET_MESSAGE_TYPE_PEERSTORE_STORE_RESULT, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_hd_var_size, GNUNET_MQ_send(), GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_STD_BACKOFF, h, handle_client_error(), LOG, GNUNET_ARM_Handle::mq, reconnect(), GNUNET_ARM_Handle::reconnect_task, and sc.

Referenced by disconnect_and_schedule_reconnect(), GNUNET_PEERSTORE_connect(), and reconnect().

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

◆ get_op_id()

static uint32_t get_op_id ( struct GNUNET_PEERSTORE_Handle h)
static

Get a fresh operation id to distinguish between namestore requests.

Parameters
hthe namestore handle
Returns
next operation id to use

Definition at line 345 of file peerstore_api.c.

346{
347 return h->last_op_id++;
348}

References h.

Referenced by GNUNET_PEERSTORE_iteration_start(), and GNUNET_PEERSTORE_store().

Here is the caller graph for this function:

◆ disconnect()

static void disconnect ( struct GNUNET_PEERSTORE_Handle h)
static

Disconnect from the peerstore service.

Parameters
hpeerstore handle to disconnect

Definition at line 357 of file peerstore_api.c.

358{
359 if (NULL != h->watches)
360 {
363 }
364 GNUNET_assert (NULL == h->iterate_head);
365 GNUNET_assert (NULL == h->store_head);
366 if (NULL != h->mq)
367 {
369 h->mq = NULL;
370 }
371}
unsigned int GNUNET_CONTAINER_multihashmap_size(const struct GNUNET_CONTAINER_MultiHashMap *map)
Get the number of key-value pairs in the map.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:683

References GNUNET_assert, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_MQ_destroy(), h, and GNUNET_ARM_Handle::mq.

Referenced by disconnect_and_schedule_reconnect(), and GNUNET_PEERSTORE_disconnect().

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

◆ disconnect_and_schedule_reconnect()

static void disconnect_and_schedule_reconnect ( struct GNUNET_PEERSTORE_Handle h)
static

Function that will schedule the job that will try to connect us again to the client.

Parameters
hpeerstore to reconnect

Definition at line 381 of file peerstore_api.c.

382{
383 GNUNET_assert (NULL == h->reconnect_task);
384 disconnect (h);
386 "Scheduling task to reconnect to PEERSTORE service in %s.\n",
389 GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
390 h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);
391}
@ GNUNET_YES
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
static void disconnect(struct GNUNET_PEERSTORE_Handle *h)
Disconnect from the peerstore service.

References disconnect(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_SCHEDULER_add_delayed(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_STD_BACKOFF, GNUNET_YES, h, LOG, reconnect(), and GNUNET_ARM_Handle::reconnect_task.

Referenced by handle_client_error().

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

◆ handle_client_error()

static void handle_client_error ( void *  cls,
enum GNUNET_MQ_Error  error 
)
static

Function called when we had trouble talking to the service.

Definition at line 403 of file peerstore_api.c.

404{
405 struct GNUNET_PEERSTORE_Handle *h = cls;
406
408 "Received an error notification from MQ of type: %d\n",
409 error);
411}
@ GNUNET_ERROR_TYPE_ERROR
static void disconnect_and_schedule_reconnect(struct GNUNET_PEERSTORE_Handle *h)
Function that will schedule the job that will try to connect us again to the client.

References disconnect_and_schedule_reconnect(), GNUNET_ERROR_TYPE_ERROR, h, and LOG.

Referenced by reconnect().

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

◆ handle_store_result()

static void handle_store_result ( void *  cls,
const struct PeerstoreResultMessage msg 
)
static

When a response for store request is received.

Parameters
clsa struct GNUNET_PEERSTORE_Handle *
msgmessage received

Definition at line 560 of file peerstore_api.c.

561{
562 struct GNUNET_PEERSTORE_Handle *h = cls;
563 struct GNUNET_PEERSTORE_StoreContext *sc = h->store_head;
564
565 LOG (GNUNET_ERROR_TYPE_DEBUG, "Got PeerstoreResultMessage\n");
566 for (sc = h->store_head; NULL != sc; sc = sc->next)
567 {
568 if (sc->rid == ntohs (msg->rid))
569 break;
570 }
571 if (NULL == sc)
572 {
574 _ ("Unexpected store response.\n"));
575 return;
576 }
577 if (NULL != sc->cont)
578 sc->cont (sc->cont_cls, ntohl (msg->result));
579 GNUNET_CONTAINER_DLL_remove (h->store_head, h->store_tail, sc);
580}
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
@ GNUNET_ERROR_TYPE_WARNING
#define _(String)
GNU gettext support macro.
Definition: platform.h:178

References _, GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, h, LOG, msg, and sc.

◆ handle_iterate_end()

static void handle_iterate_end ( void *  cls,
const struct PeerstoreResultMessage msg 
)
static

When a response for iterate request is received.

Parameters
clsa struct GNUNET_PEERSTORE_Handle *
msgmessage received

Definition at line 595 of file peerstore_api.c.

596{
597 struct GNUNET_PEERSTORE_Handle *h = cls;
598 struct GNUNET_PEERSTORE_IterateContext *ic = h->iterate_head;
599
600 for (ic = h->iterate_head; NULL != ic; ic = ic->next)
601 if (ic->rid == ntohs (msg->rid))
602 break;
603 if (NULL == ic)
604 {
606 _ ("Unexpected iteration response.\n"));
607 return;
608 }
609 if (NULL != ic->callback)
610 ic->callback (ic->callback_cls, NULL, NULL);
611 LOG (GNUNET_ERROR_TYPE_DEBUG, "Cleaning up iteration with rid %u\n", ic->rid);
612 GNUNET_CONTAINER_DLL_remove (h->iterate_head, h->iterate_tail, ic);
613}
void * callback_cls
Closure for callback.
GNUNET_PEERSTORE_Processor callback
Callback with each matching record.
struct GNUNET_PEERSTORE_IterateContext * next
Kept in a DLL.

References _, GNUNET_PEERSTORE_IterateContext::callback, GNUNET_PEERSTORE_IterateContext::callback_cls, GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, h, LOG, msg, GNUNET_PEERSTORE_IterateContext::next, and GNUNET_PEERSTORE_IterateContext::rid.

◆ check_iterate_result()

static int check_iterate_result ( void *  cls,
const struct PeerstoreRecordMessage msg 
)
static

When a response for iterate request is received, check the message is well-formed.

Parameters
clsa struct GNUNET_PEERSTORE_Handle *
msgmessage received

Definition at line 624 of file peerstore_api.c.

625{
626 /* we defer validation to #handle_iterate_result */
627 return GNUNET_OK;
628}
@ GNUNET_OK

References GNUNET_OK.

◆ handle_iterate_result()

static void handle_iterate_result ( void *  cls,
const struct PeerstoreRecordMessage msg 
)
static

When a response for iterate request is received.

Parameters
clsa struct GNUNET_PEERSTORE_Handle *
msgmessage received

Definition at line 638 of file peerstore_api.c.

639{
640 struct GNUNET_PEERSTORE_Handle *h = cls;
643
644 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received RecordMessage\n");
645 for (ic = h->iterate_head; NULL != ic; ic = ic->next)
646 if (ic->rid == ntohs (msg->rid))
647 break;
648 if (NULL == ic)
649 {
651 _ (
652 "Unexpected iteration response, no iterating client found, discarding message.\n"));
653 return;
654 }
655 if (NULL == ic->callback)
656 return;
658 if (NULL == record)
659 {
660 ic->callback (ic->callback_cls,
661 NULL,
662 _ ("Received a malformed response from service."));
663 }
664 else
665 {
666 ic->callback (ic->callback_cls, record, NULL);
668 }
669}
static void record(void *cls, size_t data_size, const void *data)
Process recorded audio data.
struct GNUNET_PEERSTORE_Record * PEERSTORE_parse_record_message(const struct PeerstoreRecordMessage *srm)
Parses a message carrying a record.
void PEERSTORE_destroy_record(struct GNUNET_PEERSTORE_Record *record)
Free any memory allocated for this record.
Single PEERSTORE record.

References _, GNUNET_PEERSTORE_IterateContext::callback, GNUNET_PEERSTORE_IterateContext::callback_cls, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, h, LOG, msg, GNUNET_PEERSTORE_IterateContext::next, PEERSTORE_destroy_record(), PEERSTORE_parse_record_message(), record(), and GNUNET_PEERSTORE_IterateContext::rid.

Here is the call graph for this function:

◆ hello_store_success()

static void hello_store_success ( void *  cls,
int  success 
)
static

Definition at line 840 of file peerstore_api.c.

841{
842 struct GNUNET_PEERSTORE_StoreHelloContext *huc = cls;
843
844 huc->sc = NULL;
845 if (GNUNET_OK != success)
846 {
848 "Storing hello uri failed\n");
849 huc->cont (huc->cont_cls, success);
850 GNUNET_free (huc->hello);
851 GNUNET_free (huc);
852 return;
853 }
854 huc->cont (huc->cont_cls, GNUNET_OK);
855 GNUNET_free (huc->hello);
856 GNUNET_free (huc);
857}
#define GNUNET_free(ptr)
Wrapper around free.
Context for a add hello uri request.
struct GNUNET_MessageHeader * hello
Hello uri which was request for storing.
GNUNET_PEERSTORE_Continuation cont
Function to call with information.
struct GNUNET_PEERSTORE_StoreContext * sc
Store operation for the merge.
void * cont_cls
Closure for callback.

References GNUNET_PEERSTORE_StoreHelloContext::cont, GNUNET_PEERSTORE_StoreHelloContext::cont_cls, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_OK, GNUNET_PEERSTORE_StoreHelloContext::hello, LOG, and GNUNET_PEERSTORE_StoreHelloContext::sc.

Referenced by hello_add_iter().

Here is the caller graph for this function:

◆ hello_add_iter()

static void hello_add_iter ( void *  cls,
const struct GNUNET_PEERSTORE_Record record,
const char *  emsg 
)
static

If we ever get here, we are newer than the existing record or the only/first record.

Definition at line 861 of file peerstore_api.c.

863{
864 struct GNUNET_PEERSTORE_StoreHelloContext *huc = cls;
865 struct GNUNET_TIME_Absolute hello_exp =
867 if ((NULL == record) && (NULL == emsg))
868 {
872 huc->sc = GNUNET_PEERSTORE_store (huc->h,
873 "peerstore",
874 &huc->pid,
876 huc->hello,
877 ntohs (huc->hello->size),
878 hello_exp,
881 huc);
882 return;
883 }
884 if (NULL != emsg)
885 {
886 LOG (GNUNET_ERROR_TYPE_ERROR, "%s\n", emsg);
888 return;
889 }
890 if (GNUNET_TIME_absolute_cmp (record->expiry, >, hello_exp))
891 {
893 "Not storing hello for %s since we seem to have a newer version on record.\n",
894 GNUNET_i2s (&huc->pid));
895 huc->cont (huc->cont_cls, GNUNET_OK);
897 GNUNET_free (huc->hello);
898 GNUNET_free (huc);
899 return;
900 }
902}
struct GNUNET_TIME_Absolute GNUNET_HELLO_builder_get_expiration_time(const struct GNUNET_MessageHeader *msg)
Get the expiration time for this HELLO.
Definition: hello-uri.c:470
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
void GNUNET_PEERSTORE_iteration_next(struct GNUNET_PEERSTORE_IterateContext *ic, uint64_t limit)
Cancel an iterate request Please do not call after the iterate request is done.
struct GNUNET_PEERSTORE_StoreContext * GNUNET_PEERSTORE_store(struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
Store a new entry in the PEERSTORE.
void GNUNET_PEERSTORE_iteration_stop(struct GNUNET_PEERSTORE_IterateContext *ic)
Cancel an iterate request Please do not call after the iterate request is done.
#define GNUNET_PEERSTORE_HELLO_KEY
Key used for storing HELLO in the peerstore.
@ GNUNET_PEERSTORE_STOREOPTION_REPLACE
Delete any previous values for the given key before storing the given value.
#define GNUNET_TIME_absolute_cmp(t1, op, t2)
Compare two absolute times.
static void hello_store_success(void *cls, int success)
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.
struct GNUNET_PEERSTORE_Handle * h
Peerstore handle.
struct GNUNET_PEERSTORE_IterateContext * ic
The iteration for the merge.
struct GNUNET_PeerIdentity pid
The peer id for the hello.
Time for absolute times used by GNUnet, in microseconds.

References GNUNET_PEERSTORE_StoreHelloContext::cont, GNUNET_PEERSTORE_StoreHelloContext::cont_cls, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_HELLO_builder_get_expiration_time(), GNUNET_i2s(), GNUNET_OK, GNUNET_PEERSTORE_HELLO_KEY, GNUNET_PEERSTORE_iteration_next(), GNUNET_PEERSTORE_iteration_stop(), GNUNET_PEERSTORE_store(), GNUNET_PEERSTORE_STOREOPTION_REPLACE, GNUNET_TIME_absolute_cmp, GNUNET_PEERSTORE_StoreHelloContext::h, GNUNET_PEERSTORE_StoreHelloContext::hello, hello_store_success(), GNUNET_PEERSTORE_StoreHelloContext::ic, LOG, GNUNET_PEERSTORE_StoreHelloContext::pid, record(), GNUNET_PEERSTORE_StoreHelloContext::sc, and GNUNET_MessageHeader::size.

Referenced by GNUNET_PEERSTORE_hello_add().

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