[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16728 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16728 - gnunet/src/mesh |
Date: |
Wed, 7 Sep 2011 18:31:55 +0200 |
Author: bartpolot
Date: 2011-09-07 18:31:55 +0200 (Wed, 07 Sep 2011)
New Revision: 16728
Modified:
gnunet/src/mesh/test_mesh_local.c
Log:
Fixed compiler whining about test
Modified: gnunet/src/mesh/test_mesh_local.c
===================================================================
--- gnunet/src/mesh/test_mesh_local.c 2011-09-07 16:24:53 UTC (rev 16727)
+++ gnunet/src/mesh/test_mesh_local.c 2011-09-07 16:31:55 UTC (rev 16728)
@@ -36,20 +36,12 @@
static struct GNUNET_MESH_Handle *mesh_peer_1;
static struct GNUNET_MESH_Handle *mesh_peer_2;
static struct GNUNET_MESH_Tunnel *t_1;
-static struct GNUNET_MESH_Tunnel *t_2;
+// static struct GNUNET_MESH_Tunnel *t_2;
static int result;
static GNUNET_SCHEDULER_TaskIdentifier abort_task;
static GNUNET_SCHEDULER_TaskIdentifier test_task;
-static struct GNUNET_MESH_MessageHandler handlers1[] = {
- {&callback, 1, 0},
- {NULL, 0, 0}
-};
-static struct GNUNET_MESH_MessageHandler handlers2[] = { {NULL, 0, 0} };
-
-
-
/**
* Function is called whenever a message is received.
*
@@ -86,13 +78,18 @@
static void *
inbound_tunnel (void *cls, struct GNUNET_MESH_Tunnel *tunnel,
const struct GNUNET_PeerIdentity *initiator,
- const structGNUNET_TRANSPORT_ATS_Information * atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information * atsi)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: \n");
return NULL;
}
+static struct GNUNET_MESH_MessageHandler handlers1[] = {
+ {&callback, 1, 0},
+ {NULL, 0, 0}
+};
+static struct GNUNET_MESH_MessageHandler handlers2[] = { {NULL, 0, 0} };
@@ -150,8 +147,20 @@
static const GNUNET_MESH_ApplicationType app2[] = { 0 };
test_task = (GNUNET_SCHEDULER_TaskIdentifier) 0;
- mesh_peer_1 = GNUNET_MESH_connect (cfg, 10, 1, NULL, NULL, handlers1, app1);
- mesh_peer_2 = GNUNET_MESH_connect (cfg, 10, 2, NULL, NULL, handlers2, app2);
+ mesh_peer_1 = GNUNET_MESH_connect (cfg,
+ 10,
+ (void *)1,
+ &inbound_tunnel,
+ NULL,
+ handlers1,
+ app1);
+ mesh_peer_2 = GNUNET_MESH_connect (cfg,
+ 10,
+ (void *)2,
+ NULL,
+ NULL,
+ handlers2,
+ app2);
if (NULL == mesh_peer_1 || NULL == mesh_peer_2)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "test: Couldn't connect to mesh
:(\n");
@@ -162,7 +171,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: YAY! CONNECTED TO MESH :D\n");
}
- t_1 = GNUNET_MESH_tunnel_create (mesh_peer_1, NULL, NULL, NULL, 1);
+ t_1 = GNUNET_MESH_tunnel_create (mesh_peer_1, NULL, NULL, NULL, (void *)1);
// t_2 = GNUNET_MESH_tunnel_create (mesh_peer_2, NULL, NULL, NULL, 2);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16728 - gnunet/src/mesh,
gnunet <=