gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r15709 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r15709 - gnunet/src/transport
Date: Fri, 17 Jun 2011 19:47:13 +0200

Author: grothoff
Date: 2011-06-17 19:47:13 +0200 (Fri, 17 Jun 2011)
New Revision: 15709

Modified:
   gnunet/src/transport/gnunet-service-transport.c
Log:
check if this pos was connected before...

Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c     2011-06-17 17:36:34 UTC 
(rev 15708)
+++ gnunet/src/transport/gnunet-service-transport.c     2011-06-17 17:47:13 UTC 
(rev 15709)
@@ -2608,7 +2608,8 @@
                                     gettext_noop ("# try_fast_reconnect thanks 
to plugin_env_session_end"),
                                     1,
                                     GNUNET_NO);
-          try_fast_reconnect (p, nl);
+         if (GNUNET_YES == pos->connected)
+           try_fast_reconnect (p, nl);
         }
       else
         {
@@ -2616,7 +2617,8 @@
                                     gettext_noop ("# disconnects due to 
missing pong"),
                                     1,
                                     GNUNET_NO);
-          disconnect_neighbour (nl, GNUNET_YES);
+         if (GNUNET_YES == pos->connected)
+           disconnect_neighbour (nl, GNUNET_YES);
         }
       return;
     }
@@ -2632,6 +2634,12 @@
     }
   GNUNET_free_non_null(pos->ressources);
   GNUNET_free_non_null(pos->quality);
+  if (GNUNET_YES != pos->connected)
+    {
+      /* nothing else to do, connection was never up... */
+      GNUNET_free (pos);
+      return; 
+    }
   GNUNET_free (pos);
   ats->stat.recreate_problem = GNUNET_YES;
   if (nl->received_pong == GNUNET_NO)
@@ -2647,7 +2655,7 @@
   pos = rl->addresses;
   while (pos != NULL)
     {
-      if (pos->validated)
+      if (GNUNET_YES == pos->validated)
        {
           GNUNET_STATISTICS_update (stats,
                                     gettext_noop ("# try_fast_reconnect thanks 
to validated_address"),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]