GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
GNUNET_log_setup ("test-pseudonym", "WARNING", NULL);
ok = GNUNET_YES;
GNUNET_CRYPTO_random_disable_entropy_gathering ();
- GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test");
+ (void) GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test");
cfg = GNUNET_CONFIGURATION_create ();
if (-1 == GNUNET_CONFIGURATION_parse (cfg, "test_pseudonym_data.conf"))
{
/* ACTUAL TEST CODE */
old = GNUNET_PSEUDONYM_list_all (cfg, NULL, NULL);
meta = GNUNET_CONTAINER_meta_data_create ();
- GNUNET_CONTAINER_meta_data_insert (meta, EXTRACTOR_TITLE,"test");
+ GNUNET_CONTAINER_meta_data_insert (meta,
+ "<test>",
+ EXTRACTOR_METATYPE_TITLE,
+ EXTRACTOR_METAFORMAT_UTF8,
+ "text/plain",
+ "test",
+ strlen("test")+1);
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &id1);
GNUNET_PSEUDONYM_add (cfg, &id1, meta);
CHECK (notiCount == 1);
CHECK (notiCount == 3);
newVal = GNUNET_PSEUDONYM_list_all (cfg, &iter, &ok);
CHECK (old < newVal);
- GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_meta_data_insert (meta, EXTRACTOR_COMMENT, m));
+ GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_meta_data_insert (meta,
+ "<test>",
+ EXTRACTOR_METATYPE_COMMENT,
+ EXTRACTOR_METAFORMAT_UTF8,
+ "text/plain",
+ m,
+ strlen(m)+1));
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &id3);
GNUNET_PSEUDONYM_add (cfg, &id3, meta);
name3 = GNUNET_PSEUDONYM_id_to_name (cfg, &id3);
GNUNET_PSEUDONYM_discovery_callback_unregister (¬i_callback, ¬iCount);
GNUNET_CONTAINER_meta_data_destroy (meta);
GNUNET_CONFIGURATION_destroy (cfg);
- GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test");
+ GNUNET_break (GNUNET_OK == GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test"));
return (ok == GNUNET_YES) ? 0 : 1;
}