struct GNUNET_ATS_Handle *GST_ats;
+/**
+ * Transmit our HELLO message to the given (connected) neighbour.
+ *
+ * @param cls the 'HELLO' message
+ * @param target a connected neighbour
+ * @param ats performance information (unused)
+ * @param ats_count number of records in ats (unused)
+ */
+static void
+transmit_our_hello (void *cls,
+ const struct GNUNET_PeerIdentity *target,
+ const struct GNUNET_TRANSPORT_ATS_Information *ats,
+ uint32_t ats_count)
+{
+ const struct GNUNET_MessageHeader *hello = cls;
+
+ GST_neighbours_send (target,
+ (const char*) hello,
+ ntohs (hello->size),
+ GST_HELLO_ADDRESS_EXPIRATION,
+ NULL, NULL);
+}
+
+
/**
* My HELLO has changed. Tell everyone who should know.
*
const struct GNUNET_MessageHeader *hello)
{
GST_clients_broadcast (hello, GNUNET_NO);
- GNUNET_break (0); // FIXME
-#if 0
- GNUNET_CONTAINER_multihashmap_iterate (neighbours,
- &transmit_our_hello_if_pong,
- NULL);
-#endif
+ GST_neighbours_iterate (&transmit_our_hello,
+ (void*) hello);
}
#include "gnunet-service-transport.h"
#include "gnunet-service-transport_plugins.h"
-/**
- * After how long do we expire an address in a HELLO that we just
- * validated? This value is also used for our own addresses when we
- * create a HELLO.
- */
-#define HELLO_ADDRESS_EXPIRATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12)
/**
* How often do we refresh our HELLO (due to expiration concerns)?
hello_task = GNUNET_SCHEDULER_NO_TASK;
gc.addr_pos = oal_head;
- gc.expiration = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION);
+ gc.expiration = GNUNET_TIME_relative_to_absolute (GST_HELLO_ADDRESS_EXPIRATION);
GNUNET_free (our_hello);
our_hello = GNUNET_HELLO_create (&GST_my_public_key,
&address_generator,
#include "gnunet_util_lib.h"
+/**
+ * After how long do we expire an address in a HELLO that we just
+ * validated? This value is also used for our own addresses when we
+ * create a HELLO.
+ */
+#define GST_HELLO_ADDRESS_EXPIRATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12)
+
+
/**
* Signature of a function to call whenever our hello changes.
*