From b294b0e78e44543024f19f197cbac39f86091b88 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Thu, 28 Jun 2018 00:58:24 +0200 Subject: [PATCH] forgot first hop --- src/cadet/gnunet-service-cadet.c | 4 ++-- src/cadet/gnunet-service-cadet_peer.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c index dd693731f..8ccf4ae07 100644 --- a/src/cadet/gnunet-service-cadet.c +++ b/src/cadet/gnunet-service-cadet.c @@ -902,9 +902,9 @@ path_info_iterator (void *cls, /* Don't copy first peer. First peer is always the local one. Last * peer is always the destination (leave as 0, EOL). */ - for (i = 0; i < off; i++) + for (i = 0; i <= off; i++) id[i] = *GCP_get_id (GCPP_get_peer_at_offset (path, - i + 1)); + i)); GNUNET_MQ_send (mq, env); return GNUNET_YES; diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index ac1ee59de..09dfcd4d7 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -243,16 +243,16 @@ GCP_2s (const struct CadetPeer *cp) static char buf[5]; char *ret; - if (NULL == cp || - NULL == &cp->pid.public_key){ + if ((NULL == cp) || + (NULL == &cp->pid.public_key)) return "NULL"; - } + ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); - if (NULL == ret){ + if (NULL == ret) return "NULL"; - } + strncpy (buf, ret, -- 2.25.1