From: Bart Polot Date: Thu, 30 Jan 2014 12:28:39 +0000 (+0000) Subject: - fix SEGFAULT on ctrl+c in testcase X-Git-Tag: initial-import-from-subversion-38251~4878 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3c9e3e1e5f936940c3e8112c6c4aa4bd8ee52c59;p=oweals%2Fgnunet.git - fix SEGFAULT on ctrl+c in testcase --- 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,