gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r14334 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r14334 - gnunet/src/testing
Date: Thu, 3 Feb 2011 20:28:14 +0100

Author: nevans
Date: 2011-02-03 20:28:14 +0100 (Thu, 03 Feb 2011)
New Revision: 14334

Modified:
   gnunet/src/testing/testing_group.c
Log:
remove attempt at throttling attempted connections

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2011-02-03 16:41:01 UTC (rev 14333)
+++ gnunet/src/testing/testing_group.c  2011-02-03 19:28:14 UTC (rev 14334)
@@ -843,13 +843,6 @@
 static int outstanding_connects;
 
 /**
- * Number of connects we have scheduled at the same
- * time, the more we already have scheduled the longer
- * we should wait before calling schedule_connect again.
- */
-static int outstanding_scheduled_connects;
-
-/**
  * Get a topology from a string input.
  *
  * @param topology where to write the retrieved topology
@@ -2851,14 +2844,8 @@
                   _
                   ("Delaying connect, we have too many outstanding 
connections!\n"));
 #endif
-      if (GNUNET_NO == connect_context->counted)
-        {
-          connect_context->counted = GNUNET_YES;
-          outstanding_scheduled_connects++;
-        }
-      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_add 
(GNUNET_TIME_relative_multiply
-                                    (GNUNET_TIME_UNIT_MILLISECONDS, 100), 
GNUNET_TIME_relative_multiply
-                                        (GNUNET_TIME_UNIT_MILLISECONDS, 
outstanding_scheduled_connects * 2)),
+      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
+                                    (GNUNET_TIME_UNIT_MILLISECONDS, 100),
                                     &schedule_connect, connect_context);
     }
   else
@@ -2869,7 +2856,6 @@
                   outstanding_connects);
 #endif
       outstanding_connects++;
-      outstanding_scheduled_connects--;
       GNUNET_TESTING_daemons_connect (connect_context->first,
                                       connect_context->second,
                                       CONNECT_TIMEOUT,
@@ -3044,14 +3030,7 @@
           connect_context->first = pg->peers[pg_iter].daemon;
           connect_context->second = pg->peers[connection_iter->index].daemon;
           connect_context->ct_ctx = ct_ctx;
-          if (total < MAX_OUTSTANDING_CONNECTIONS)
-            {
-              GNUNET_SCHEDULER_add_now (&schedule_connect, connect_context);
-            }
-          else
-            {
-              GNUNET_SCHEDULER_add_delayed 
(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 1000 * (total / 
MAX_OUTSTANDING_CONNECTIONS)), &schedule_connect, connect_context);
-            }
+          GNUNET_SCHEDULER_add_now (&schedule_connect, connect_context);
           connection_iter = connection_iter->next;
           total++;
         }




reply via email to

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