fix
authorChristian Grothoff <christian@grothoff.org>
Mon, 17 Oct 2011 10:59:51 +0000 (10:59 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 17 Oct 2011 10:59:51 +0000 (10:59 +0000)
src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_neighbours.c

index 31f6de1d8a265a9d485f69d693b1cd9ea7e8e7db..0a56c85a18eeb3d378089d1c77c4e40a6e20a60d 100644 (file)
@@ -170,7 +170,7 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
   int do_forward;
   struct GNUNET_TIME_Relative ret;
   uint16_t type;
-
+  
   ret = GNUNET_TIME_UNIT_ZERO;
   if (NULL != message)
   {
index f0dca68748c212a1bf934a513358e3fcfeab48a4..3dc70792374b501b250ac495f83446a9aa665867 100644 (file)
@@ -639,7 +639,6 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
   int was_connected;
 
   GNUNET_assert (neighbours != NULL);
-
   n = lookup_neighbour (peer);
   if (NULL == n)
   {
@@ -650,8 +649,9 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
   }
   was_connected = n->is_connected;
   n->is_connected = GNUNET_YES;
-  n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task,
-                                                n);
+  if (GNUNET_YES != was_connected)
+    n->keepalive_task = GNUNET_SCHEDULER_add_now (&neighbour_keepalive_task,
+                                                 n);
 
 #if DEBUG_TRANSPORT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,