/**
* Signature for a 'struct TransportPongMessage' for this address.
*/
- struct GNUNET_CRYPTO_EccSignature pong_signature;
+ struct GNUNET_CRYPTO_EddsaSignature pong_signature;
};
* @param cls the 'struct GeneratorContext'
* @param max maximum number of bytes left
* @param buf where to write the address
+ * @return bytes written or GNUNET_SYSERR to signal the
+ * end of the iteration.
*/
-static size_t
+static ssize_t
address_generator (void *cls, size_t max, void *buf)
{
struct GeneratorContext *gc = cls;
- size_t ret;
+ ssize_t ret;
if (NULL == gc->addr_pos)
- return 0;
- ret =
- GNUNET_HELLO_add_address (gc->addr_pos->address, gc->expiration, buf,
+ return GNUNET_SYSERR; /* Done */
+ ret = GNUNET_HELLO_add_address (gc->addr_pos->address, gc->expiration, buf,
max);
gc->addr_pos = gc->addr_pos->next;
return ret;
friend_only = GNUNET_HELLO_is_friend_only (our_hello);
GNUNET_free (our_hello);
- our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc, friend_only);
+ our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key,
+ &address_generator,
+ &gc, friend_only);
GNUNET_assert (NULL != our_hello);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Refreshed my %s `%s', new size is %d\n",
{
hello_cb = cb;
hello_cb_cls = cb_cls;
- our_hello = GNUNET_HELLO_create (&GST_my_public_key, NULL, NULL, friend_only);
+ our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key,
+ NULL, NULL, friend_only);
GNUNET_assert (NULL != our_hello);
refresh_hello ();
}
GNUNET_break (0);
return;
}
- al = GNUNET_malloc (sizeof (struct OwnAddressList));
+ al = GNUNET_new (struct OwnAddressList);
GNUNET_CONTAINER_DLL_insert (oal_head, oal_tail, al);
al->address = GNUNET_HELLO_address_copy (address);
refresh_hello ();
*/
int
GST_hello_test_address (const struct GNUNET_HELLO_Address *address,
- struct GNUNET_CRYPTO_EccSignature **sig,
+ struct GNUNET_CRYPTO_EddsaSignature **sig,
struct GNUNET_TIME_Absolute **sig_expiration)
{
struct OwnAddressList *al;