aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-02-21 11:25:26 +0000
committerBart Polot <bart@net.in.tum.de>2012-02-21 11:25:26 +0000
commit50f5be5f60ff17d53526c97670f019721881286f (patch)
treebdea797c3be6993deaec545691c18a6ebc9f5970 /src/mesh
parent3438deb5184ea9530e9469fe389ee453cd796fbc (diff)
downloadgnunet-50f5be5f60ff17d53526c97670f019721881286f.tar.gz
gnunet-50f5be5f60ff17d53526c97670f019721881286f.zip
- Destroy tunnel to avoid api complaints, initialize return value explicitly
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/test_mesh_local_1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesh/test_mesh_local_1.c b/src/mesh/test_mesh_local_1.c
index a7ca77ccd..8e1e9b2d0 100644
--- a/src/mesh/test_mesh_local_1.c
+++ b/src/mesh/test_mesh_local_1.c
@@ -55,6 +55,10 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
55 { 55 {
56 GNUNET_SCHEDULER_cancel (abort_task); 56 GNUNET_SCHEDULER_cancel (abort_task);
57 } 57 }
58 if (NULL != t)
59 {
60 GNUNET_MESH_tunnel_destroy(t);
61 }
58 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: D1\n"); 62 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: D1\n");
59 if (NULL != mesh_peer_1) 63 if (NULL != mesh_peer_1)
60 { 64 {
@@ -173,7 +177,7 @@ inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel,
173 177
174 178
175/** 179/**
176 * Method called whenever a peer has disconnected from the tunnel. 180 * Method called whenever a peer has connected to the tunnel.
177 * 181 *
178 * @param cls closure 182 * @param cls closure
179 * @param peer peer identity the tunnel stopped working with 183 * @param peer peer identity the tunnel stopped working with
@@ -222,6 +226,7 @@ static struct GNUNET_MESH_MessageHandler handlers2[] = { {NULL, 0, 0} };
222static void 226static void
223do_find (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 227do_find (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
224{ 228{
229 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: CONNECT BY TYPE\n");
225 GNUNET_MESH_peer_request_connect_by_type (t, 1); 230 GNUNET_MESH_peer_request_connect_by_type (t, 1);
226} 231}
227 232
@@ -319,6 +324,7 @@ main (int argc, char *argv[])
319 GNUNET_GETOPT_OPTION_END 324 GNUNET_GETOPT_OPTION_END
320 }; 325 };
321 326
327 result = GNUNET_OK;
322 ret = 328 ret =
323 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, 329 GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
324 "test-mesh-local", "nohelp", options, &run, NULL); 330 "test-mesh-local", "nohelp", options, &run, NULL);