gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24472 - gnunet/src/testbed


From: gnunet
Subject: [GNUnet-SVN] r24472 - gnunet/src/testbed
Date: Tue, 23 Oct 2012 14:37:30 +0200

Author: harsha
Date: 2012-10-23 14:37:30 +0200 (Tue, 23 Oct 2012)
New Revision: 24472

Modified:
   gnunet/src/testbed/gnunet-testbed-profiler.c
Log:
exit during errors too

Modified: gnunet/src/testbed/gnunet-testbed-profiler.c
===================================================================
--- gnunet/src/testbed/gnunet-testbed-profiler.c        2012-10-23 12:31:56 UTC 
(rev 24471)
+++ gnunet/src/testbed/gnunet-testbed-profiler.c        2012-10-23 12:37:30 UTC 
(rev 24472)
@@ -358,6 +358,7 @@
                                                      topology,
                                                      
GNUNET_TESTBED_TOPOLOGY_DISABLE_AUTO_RETRY,
                                                      
GNUNET_TESTBED_TOPOLOGY_OPTION_END);
+      num_links = num_peers * (num_peers - 1);
       break;
     default:
       GNUNET_assert (0);
@@ -524,7 +525,7 @@
     }
     break;
   case STATE_PEERS_LINKING:
-   switch (event->type)
+    switch (event->type)
     {
     case GNUNET_TESTBED_ET_OPERATION_FINISHED:
       /* Control reaches here when a peer linking operation fails */
@@ -539,6 +540,7 @@
          print_overlay_links_summary ();         
          GNUNET_SCHEDULER_cancel (abort_task);
          abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
+         return;
        }
       }
       break;
@@ -551,19 +553,17 @@
        printf (".");
        fflush (stdout);
         established_links++;
-        if ((established_links + failed_links) == 
-            (GNUNET_TESTBED_TOPOLOGY_CLIQUE == topology ? 
-             num_peers * (num_peers -1) : num_links))
-        {
-         print_overlay_links_summary ();
-         result = GNUNET_OK;
-          shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
-        }
       }
       break;
     default:
       GNUNET_assert (0);
     }
+    if ((established_links + failed_links) == num_links)
+    {
+      print_overlay_links_summary ();
+      result = GNUNET_OK;
+      shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
+    }    
     break;
   default:
     GNUNET_assert (0);




reply via email to

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