From 02f9bfff7dac518b4ec881d3c99164777b061119 Mon Sep 17 00:00:00 2001 From: Philipp Tölke Date: Sun, 10 Apr 2011 11:22:35 +0000 Subject: send hello to self --- src/mesh/mesh_api.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/mesh') diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 68b2e587d..fc92f9bb4 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -181,6 +181,17 @@ core_connect (void *cls, const struct GNUNET_TRANSPORT_ATS_Information *atsi) { struct GNUNET_MESH_Handle *handle = cls; + + /* Send a hello to this peer */ + GNUNET_CORE_notify_transmit_ready(handle->core, + GNUNET_NO, + 42, + GNUNET_TIME_UNIT_SECONDS, + peer, + sizeof(struct GNUNET_MessageHeader) + handle->hello_message_size, + &send_hello_message, + cls); + /* Check for connect-to-self-message, which we ignore */ if (0 == memcmp (peer, &handle->myself, sizeof (struct GNUNET_PeerIdentity))) @@ -220,15 +231,6 @@ core_connect (void *cls, else tunnel = tunnel->next; } - GNUNET_CORE_notify_transmit_ready(handle->core, - GNUNET_NO, - 42, - GNUNET_TIME_UNIT_SECONDS, - peer, - sizeof(struct GNUNET_MessageHeader) + handle->hello_message_size, - &send_hello_message, - cls); - } /** -- cgit v1.2.3