fix
authorChristian Grothoff <christian@grothoff.org>
Sun, 5 Jun 2011 17:12:06 +0000 (17:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 5 Jun 2011 17:12:06 +0000 (17:12 +0000)
src/core/gnunet-service-core.c

index 37960f76a93a264553c5cb3950185733e55d9d53..e1a9022176017d727206d8a25f1ec9fcf27a1e62 100644 (file)
@@ -3123,25 +3123,12 @@ send_key (struct Neighbour *n)
     }
   if (GNUNET_YES != n->is_connected)
     {
-#if DEBUG_CORE
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Not yet connected to peer `%4s'!\n",
-                  GNUNET_i2s (&n->peer));
-#endif
-      if (NULL == n->th)
-       {
-         GNUNET_STATISTICS_update (stats, 
-                                   gettext_noop ("# Asking transport to connect (for SET_KEY)"), 
-                                   1, 
-                                   GNUNET_NO);
-         n->th = GNUNET_TRANSPORT_notify_transmit_ready (transport,
-                                                         &n->peer,
-                                                         sizeof (struct SetKeyMessage) + sizeof (struct PingMessage),
-                                                         0,
-                                                         GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
-                                                         &notify_encrypted_transmit_ready,
-                                                         n);
-       }
+      GNUNET_STATISTICS_update (stats, 
+                               gettext_noop ("# Asking transport to connect (for SET_KEY)"), 
+                               1, 
+                               GNUNET_NO);
+      GNUNET_TRANSPORT_try_connect (transport,
+                                   &n->peer);
       return; 
     }
 #if DEBUG_CORE