static GNUNET_HashCode id1;
static int
-iter (void *cls,
- const GNUNET_HashCode *
- pseudonym, const struct GNUNET_CONTAINER_MetaData *md, int rating)
+iter (void *cls, const GNUNET_HashCode * pseudonym,
+ const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
int *ok = cls;
- if ((0 == memcmp (pseudonym,
- &id1,
- sizeof (GNUNET_HashCode))) &&
+ if ((0 == memcmp (pseudonym, &id1, sizeof (GNUNET_HashCode))) &&
(!GNUNET_CONTAINER_meta_data_test_equal (md, meta)))
{
*ok = GNUNET_NO;
}
static int
-noti_callback (void *cls,
- const GNUNET_HashCode *
- pseudonym,
+noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
int *ret = cls;
}
static int
-fake_noti_callback (void *cls,
- const GNUNET_HashCode *
- pseudonym,
+fake_noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
int *ret = cls;
}
static int
-false_callback (void *cls,
- const GNUNET_HashCode * pseudonym,
+false_callback (void *cls, const GNUNET_HashCode * pseudonym,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
return GNUNET_OK;
notiCount = 0;
fakenotiCount = 0;
count = 0;
- GNUNET_PSEUDONYM_discovery_callback_register (cfg,
- &fake_noti_callback,
+ GNUNET_PSEUDONYM_discovery_callback_register (cfg, &fake_noti_callback,
&fakenotiCount);
GNUNET_PSEUDONYM_discovery_callback_register (cfg, ¬i_callback,
¬iCount);
/* ACTUAL TEST CODE */
old = GNUNET_PSEUDONYM_list_all (cfg, NULL, NULL);
meta = GNUNET_CONTAINER_meta_data_create ();
- GNUNET_CONTAINER_meta_data_insert (meta,
- "<test>",
- EXTRACTOR_METATYPE_TITLE,
- EXTRACTOR_METAFORMAT_UTF8,
- "text/plain", "test", strlen ("test") + 1);
+ 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,
- "<test>",
- EXTRACTOR_METATYPE_COMMENT,
- EXTRACTOR_METAFORMAT_UTF8,
- "text/plain",
- m,
- strlen (m) +
- 1));
+ 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);