From 3c9e3e1e5f936940c3e8112c6c4aa4bd8ee52c59 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 30 Jan 2014 12:28:39 +0000 Subject: [PATCH] - fix SEGFAULT on ctrl+c in testcase --- src/mesh/test_mesh_single.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesh/test_mesh_single.c b/src/mesh/test_mesh_single.c index b40efa92b..6fc22362c 100644 --- a/src/mesh/test_mesh_single.c +++ b/src/mesh/test_mesh_single.c @@ -255,6 +255,9 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) struct GNUNET_PeerIdentity id; size_t size = sizeof (struct GNUNET_MessageHeader) + DATA_SIZE; + if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) + return; + GNUNET_TESTING_peer_get_identity (me, &id); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CONNECT BY PORT\n"); ch1 = GNUNET_MESH_channel_create (mesh, NULL, &id, 1, -- 2.25.1