gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27417 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r27417 - gnunet/src/mesh
Date: Tue, 11 Jun 2013 18:21:52 +0200

Author: bartpolot
Date: 2013-06-11 18:21:51 +0200 (Tue, 11 Jun 2013)
New Revision: 27417

Modified:
   gnunet/src/mesh/test_mesh2_small.c
Log:
- fix remaining warnings

Modified: gnunet/src/mesh/test_mesh2_small.c
===================================================================
--- gnunet/src/mesh/test_mesh2_small.c  2013-06-11 16:17:30 UTC (rev 27416)
+++ gnunet/src/mesh/test_mesh2_small.c  2013-06-11 16:21:51 UTC (rev 27417)
@@ -183,11 +183,6 @@
 static struct GNUNET_MESH_Tunnel *incoming_t;
 
 /**
- * Tunnel handle for the second leaf peer
- */
-static struct GNUNET_MESH_Tunnel *incoming_t2;
-
-/**
  * Time we started the data transmission (after tunnel has been established
  * and initilized).
  */
@@ -264,11 +259,6 @@
     GNUNET_MESH_tunnel_destroy (incoming_t);
     incoming_t = NULL;
   }
-  if (NULL != incoming_t2)
-  {
-    GNUNET_MESH_tunnel_destroy (incoming_t2);
-    incoming_t2 = NULL;
-  }
   GNUNET_MESH_TEST_cleanup (test_ctx);
   if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle)
   {
@@ -569,8 +559,6 @@
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: %d\n", ok);
   if ((long) cls == 4L)
     incoming_t = tunnel;
-  else if ((long) cls == 3L)
-    incoming_t2 = tunnel;
   else
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -611,10 +599,15 @@
     ok++;
     incoming_t = NULL;
   }
-  else if (3L == i)
+  else if (0L == i && P2P_SIGNAL == test)
   {
-    ok++;
-    incoming_t2 = NULL;
+    ok ++;
+    if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
+    {
+      GNUNET_SCHEDULER_cancel (disconnect_task);
+    }
+    disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
+                                                (void *) __LINE__);
   }
   else
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -636,32 +629,6 @@
 
 
 /**
- * Method called whenever a tunnel falls apart.
- *
- * @param cls closure
- * @param peer peer identity the tunnel stopped working with
- */
-static void
-dh (void *cls, const struct GNUNET_PeerIdentity *peer)
-{
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "peer %s disconnected\n",
-              GNUNET_i2s (peer));
-  if (P2P_SIGNAL == test)
-  {
-    ok ++;
-    if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
-    {
-      GNUNET_SCHEDULER_cancel (disconnect_task);
-    }
-    disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
-                                                (void *) __LINE__);
-  }
-  return;
-}
-
-
-/**
  * START THE TESTCASE ITSELF, AS WE ARE CONNECTED TO THE MESH SERVICES.
  * 
  * Testcase continues when the root receives confirmation of connected peers,




reply via email to

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