-log
[oweals/gnunet.git] / src / mesh / test_mesh_single.c
index 689139b82c63ec4034836d0ded2b3da3f704de33..6fc22362c579e7f0137086c3150f2e55a5d6c814 100644 (file)
@@ -169,7 +169,7 @@ data_callback (void *cls, struct GNUNET_MESH_Channel *channel,
 static void *
 inbound_channel (void *cls, struct GNUNET_MESH_Channel *channel,
                 const struct GNUNET_PeerIdentity *initiator,
-                uint32_t port, enum MeshOption options)
+                uint32_t port, enum GNUNET_MESH_ChannelOption options)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "received incoming channel on port %u\n",
@@ -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,