*/
struct GNUNET_STATISTICS_Handle *GSF_stats;
-/**
- * Pointer to handle to the core service (points to NULL until we've
- * connected to it).
- */
-struct GNUNET_CORE_Handle *GSF_core;
-
/**
* Handle for DHT operations.
*/
*/
struct GNUNET_BLOCK_Context *GSF_block_ctx;
+/**
+ * Pointer to handle to the core service (points to NULL until we've
+ * connected to it).
+ */
+struct GNUNET_CORE_Handle *GSF_core;
+
/* ***************************** locals ******************************* */
*/
static GNUNET_SCHEDULER_TaskIdentifier cover_age_task;
-/**
- * Pointer to handle to the core service (points to NULL until we've
- * connected to it).
- */
-static struct GNUNET_CORE_Handle *core;
-
/**
* Datastore 'GET' load tracking.
*/
shutdown_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- if (NULL != core)
+ if (NULL != GSF_core)
{
- GNUNET_CORE_disconnect (core);
- core = NULL;
+ GNUNET_CORE_disconnect (GSF_core);
+ GSF_core = NULL;
}
GSF_put_done_ ();
GSF_push_done_ ();
{NULL, NULL, 0, 0}
};
- core = GNUNET_CORE_connect (GSF_cfg,
- 1, /* larger? */
- NULL,
- &peer_init_handler,
- &peer_connect_handler,
- &GSF_peer_disconnect_handler_,
- &GSF_peer_status_handler_,
- NULL, GNUNET_NO,
- NULL, GNUNET_NO,
- p2p_handlers);
- if (NULL == core)
+ GSF_core = GNUNET_CORE_connect (GSF_cfg,
+ 1, /* larger? */
+ NULL,
+ &peer_init_handler,
+ &peer_connect_handler,
+ &GSF_peer_disconnect_handler_,
+ &GSF_peer_status_handler_,
+ NULL, GNUNET_NO,
+ NULL, GNUNET_NO,
+ p2p_handlers);
+ if (NULL == GSF_core)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Failed to connect to `%s' service.\n"),
{
GSF_cfg = cfg;
GSF_dsh = GNUNET_DATASTORE_connect (cfg);
- if (GSF_dsh == NULL)
+ if (NULL == GSF_dsh)
{
GNUNET_SCHEDULER_shutdown ();
return;
* @param pr request that is done
*/
void
-GSF_plan_notify_request_done_ (const struct GSF_PendingRequest *pr)
+GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr)
{
struct GSF_RequestPlan *rp;
struct GSF_PendingRequestData *prd;
+ prd = GSF_pending_request_get_data_ (pr);
while (NULL != (rp = prd->rp_head))
{
- prd = GSF_pending_request_get_data_ (rp->pr);
GNUNET_CONTAINER_heap_remove_node (rp->hn);
GNUNET_CONTAINER_DLL_remove (prd->rp_head,
prd->rp_tail,