/*
This file is part of GNUnet.
- (C)
+ Copyright (C)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* @param tc scheduler context
*/
static void
-shutdown_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- if(NULL != peerstore_handle)
+ if (NULL != peerstore_handle)
{
- GNUNET_PEERSTORE_disconnect(peerstore_handle, GNUNET_YES);
+ GNUNET_PEERSTORE_disconnect (peerstore_handle, GNUNET_YES);
peerstore_handle = NULL;
}
}
+
/**
* Main function that will be run by the scheduler.
*
* @param cfg configuration
*/
static void
-run (void *cls,
- char *const *args,
- const char *cfgfile,
+run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
peerstore_handle = NULL;
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &shutdown_task,
- NULL);
- peerstore_handle = GNUNET_PEERSTORE_connect(cfg);
- GNUNET_assert(NULL != peerstore_handle);
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
+ NULL);
+ peerstore_handle = GNUNET_PEERSTORE_connect (cfg);
+ GNUNET_assert (NULL != peerstore_handle);
ret = 0;
}
+
/**
* The main function to peerstore.
*
GNUNET_GETOPT_OPTION_END
};
return (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc,
- argv,
- "gnunet-peerstore [options [value]]",
- gettext_noop
- ("peerstore"),
- options, &run, NULL)) ? ret : 1;
+ GNUNET_PROGRAM_run (argc, argv, "gnunet-peerstore [options [value]]",
+ gettext_noop ("peerstore"), options, &run,
+ NULL)) ? ret : 1;
}
/* end of gnunet-peerstore.c */