REST/NAMESTORE: rework API
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet_peer.c
index 53c51c27a95a508b1f1051efcf02f02c3e449e76..8d55e6386d32bd172d41cbdf67782875073fe763 100644 (file)
@@ -14,6 +14,8 @@
     
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 
 /**
@@ -243,11 +245,17 @@ GCP_2s (const struct CadetPeer *cp)
   static char buf[5];
   char *ret;
 
-  if (NULL == cp || NULL == &cp->pid.public_key)
-      return "NULL";
+  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)
-      return "NULL";
+    return "NULL";
+  
+  
   strncpy (buf,
            ret,
            sizeof (buf) - 1);
@@ -1211,6 +1219,8 @@ GCP_iterate_paths (struct CadetPeer *cp,
        (NULL == cp->core_mq) ? "" : " including direct link");
   if (NULL != cp->core_mq)
   {
+    /* FIXME: this branch seems to duplicate the 
+       i=0 case below (direct link). Leave out!??? -CG */
     struct CadetPeerPath *path;
 
     path = GCPP_get_path_from_route (1,