From 97be2db5f3765d3d8dd728b644cc2dbbfd10564d Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 2 Oct 2015 03:37:27 +0000 Subject: [PATCH] - use correct hash type --- src/cadet/gnunet-service-cadet_local.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_local.c b/src/cadet/gnunet-service-cadet_local.c index 79694a242..f755b8813 100644 --- a/src/cadet/gnunet-service-cadet_local.c +++ b/src/cadet/gnunet-service-cadet_local.c @@ -944,7 +944,7 @@ static void iter_channel (void *cls, struct CadetChannel *ch) { struct GNUNET_CADET_LocalInfoTunnel *msg = cls; - struct GNUNET_HashCode *h = (struct GNUNET_HashCode *) &msg[1]; + struct GNUNET_CADET_Hash *h = (struct GNUNET_CADET_Hash *) &msg[1]; CADET_ChannelNumber *chn = (CADET_ChannelNumber *) &h[msg->connections]; chn[msg->channels] = htonl (GCCH_get_id (ch)); @@ -1018,12 +1018,13 @@ handle_show_tunnel (void *cls, struct GNUNET_SERVER_Client *client, resp = GNUNET_malloc (size); resp->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL); resp->header.size = htons (size); + resp->destination = msg->peer; + /* Do not interleave with iterators, iter_channel needs conn in HBO */ GCT_iterate_connections (t, &iter_connection, resp); GCT_iterate_channels (t, &iter_channel, resp); - /* Do not interleave with iterators, iter_channel needs conn in HBO */ - resp->destination = msg->peer; resp->connections = htonl (resp->connections); resp->channels = htonl (resp->channels); + /* Do not interleave end */ resp->cstate = htons (GCT_get_cstate (t)); resp->estate = htons (GCT_get_estate (t)); GNUNET_SERVER_notification_context_unicast (nc, c->handle, -- 2.25.1