/*
This file is part of GNUnet.
- (C) 2012, 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2012, 2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
static struct GNUNET_NAMECACHE_Handle *nch;
-static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
+static struct GNUNET_SCHEDULER_Task * endbadly_task;
static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
GNUNET_free (privkey);
privkey = NULL;
}
- if (NULL != directory)
- {
- GNUNET_DISK_directory_remove (directory);
- GNUNET_free (directory);
- }
GNUNET_SCHEDULER_shutdown ();
}
GNUNET_assert (0 == memcmp (&rd_cmp_data, rd[0].data, TEST_RECORD_DATALEN2));
GNUNET_SCHEDULER_cancel (endbadly_task);
- endbadly_task = GNUNET_SCHEDULER_NO_TASK;
+ endbadly_task = NULL;
GNUNET_SCHEDULER_add_now (&end, NULL);
}
}
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Namecache returned no block for `%s'\n"),
name);
- if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
+ if (endbadly_task != NULL)
GNUNET_SCHEDULER_cancel (endbadly_task);
endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL);
return;
char *hostkey_file;
directory = NULL;
- GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory));
+ GNUNET_DISK_directory_remove (directory);
update_performed = GNUNET_NO;
endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
int
main (int argc, char *argv[])
{
- GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
res = 1;
if (0 !=
GNUNET_TESTING_peer_run ("test-namestore-api-store-update",
"test_namestore_api.conf",
&run,
NULL))
- return 1;
+ {
+ res = 1;
+ }
+ if (NULL != directory)
+ {
+ GNUNET_DISK_directory_remove (directory);
+ GNUNET_free (directory);
+ }
return res;
}