From 4e9b8b550bb701db8d3dfaffde5c570b12ffbe85 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 10 Jul 2013 13:12:03 +0000 Subject: [PATCH] - fix decoding of tunnel options --- src/mesh/gnunet-service-mesh.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 602b9bda9..8947e7175 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -2654,8 +2654,10 @@ tunnel_new (GNUNET_PEER_Id owner, static void tunnel_set_options (struct MeshTunnel *t, uint32_t options) { - t->nobuffer = options & GNUNET_MESH_OPTION_NOBUFFER; - t->reliable = options & GNUNET_MESH_OPTION_RELIABLE; + t->nobuffer = (options & GNUNET_MESH_OPTION_NOBUFFER) != 0 ? + GNUNET_YES : GNUNET_NO; + t->reliable = (options & GNUNET_MESH_OPTION_RELIABLE) != 0 ? + GNUNET_YES : GNUNET_NO; } @@ -4432,7 +4434,7 @@ handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client, tunnel_set_options (t, ntohl (t_msg->options)); if (GNUNET_YES == t->reliable) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Reliable \n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Reliable\n"); t->sent_messages_fwd = GNUNET_CONTAINER_multihashmap32_create (t->queue_max); } -- 2.25.1