#include "gnunet_program_lib.h"
#include "gnunet_protocols.h"
-#define VERBOSE GNUNET_NO
-
#define START_ARM GNUNET_YES
#define LOG_BACKOFF GNUNET_NO
if (msg == NULL)
{
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service shutdown complete.\n");
-#endif
if (shutdown_ctx->cont != NULL)
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO);
switch (ntohs (msg->type))
{
case GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN:
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received confirmation for service shutdown.\n");
-#endif
shutdown_ctx->confirmed = GNUNET_YES;
GNUNET_CLIENT_receive (shutdown_ctx->sock,
&service_shutdown_handler, shutdown_ctx,
task (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
+ char *armconfig;
cfg = c;
+ if (NULL != cfgfile)
+ {
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename (cfg, "arm", "CONFIG",
+ &armconfig))
+ {
+ GNUNET_CONFIGURATION_set_value_string (cfg, "arm", "CONFIG",
+ cfgfile);
+ }
+ else
+ GNUNET_free (armconfig);
+ }
arm = GNUNET_ARM_connect (cfg, NULL);
#if START_ARM
char *const argv[] = {
"test-exponential-backoff",
"-c", "test_arm_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
struct GNUNET_GETOPT_CommandLineOption options[] = {
int ret;
GNUNET_log_setup ("test-exponential-backoff",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
init ();