send hello to self
authorPhilipp Tölke <toelke@in.tum.de>
Sun, 10 Apr 2011 11:22:35 +0000 (11:22 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Sun, 10 Apr 2011 11:22:35 +0000 (11:22 +0000)
src/mesh/mesh_api.c

index 68b2e587dd146ba4d7ba153d36f88abf72066a6e..fc92f9bb4d2750b64af4a08996a0db7ebf6957f2 100644 (file)
@@ -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);
-
 }
 
 /**