Merge branch 'master' of ssh://gnunet.org/gnunet
authort3sserakt <t3ss@posteo.de>
Wed, 27 Jun 2018 23:36:18 +0000 (01:36 +0200)
committert3sserakt <t3ss@posteo.de>
Wed, 27 Jun 2018 23:36:23 +0000 (01:36 +0200)
src/cadet/gnunet-service-cadet.c
src/cadet/gnunet-service-cadet_peer.c

index d61556785236cefa3644332ab64ef780d8c1047e..712c6339a17bbdb16ac91a8400c256d7d452051f 100644 (file)
@@ -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;
index bd642f1552138fe515096eea5e48ca8b3d2cbf44..b375d51ca3d15c93b90ef6a5f43a50756a329e99 100644 (file)
@@ -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,