-log
[oweals/gnunet.git] / src / mesh / test_mesh_single.c
index 15e8a1dbd80437dfe5671f431d6e951d9ef74cac..6fc22362c579e7f0137086c3150f2e55a5d6c814 100644 (file)
@@ -162,13 +162,14 @@ data_callback (void *cls, struct GNUNET_MESH_Channel *channel,
  * @param channel new handle to the channel
  * @param initiator peer that started the channel
  * @param port port number
+ * @param options channel option flags
  * @return initial channel context for the channel
  *         (can be NULL -- that's not an error)
  */
 static void *
 inbound_channel (void *cls, struct GNUNET_MESH_Channel *channel,
                 const struct GNUNET_PeerIdentity *initiator,
-                uint32_t port)
+                uint32_t port, enum GNUNET_MESH_ChannelOption options)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "received incoming channel on port %u\n",
@@ -254,9 +255,13 @@ 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, GNUNET_YES, GNUNET_NO);
+  ch1 = GNUNET_MESH_channel_create (mesh, NULL, &id, 1,
+                                    GNUNET_MESH_OPTION_DEFAULT);
   GNUNET_MESH_notify_transmit_ready (ch1, GNUNET_NO,
                                      GNUNET_TIME_UNIT_FOREVER_REL,
                                      size, &do_send, NULL);