clean up for configs
[oweals/gnunet.git] / src / mesh / test_mesh_small.c
index 49e394f030254aadc6df4bef52384033045d6ef2..368c07a97e9d370e2d7553abc1f347ac46397623 100644 (file)
@@ -355,7 +355,7 @@ tmt_rdy (void *cls, size_t size, void *buf)
   if (size < size_payload || NULL == buf)
   {
     GNUNET_break (ok >= ok_goal - 2);
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "size %u, buf %p, data_sent %u, data_received %u\n",
                 size,
                 buf,
@@ -536,13 +536,14 @@ static struct GNUNET_MESH_MessageHandler handlers[] = {
  * @param channel New handle to the channel.
  * @param initiator Peer that started the channel.
  * @param port Port this channel is connected to.
+ * @param options channel option flags
  * @return Initial channel context for the channel
  *         (can be NULL -- that's not an error).
  */
 static void *
 incoming_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_INFO,
               "Incoming channel from %s to peer %d\n",
@@ -629,7 +630,7 @@ channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel,
 static void
 do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  int rel;
+  enum GNUNET_MESH_ChannelOption flags;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test_task\n");
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "add peer 2\n");
@@ -641,14 +642,13 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_SCHEDULER_cancel (disconnect_task);
   }
 
+  flags = GNUNET_MESH_OPTION_DEFAULT;
   if (SPEED_REL == test)
   {
     test = SPEED;
-    rel = GNUNET_YES;
+    flags |= GNUNET_MESH_OPTION_RELIABLE;
   }
-  else
-    rel = GNUNET_NO;
-  ch = GNUNET_MESH_channel_create (h1, NULL, p_id[1], 1, GNUNET_NO, rel);
+  ch = GNUNET_MESH_channel_create (h1, NULL, p_id[1], 1, flags);
 
   disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
                                                   &disconnect_mesh_peers,