- add separate encryption enabled mesh to avoid breakage during developement
[oweals/gnunet.git] / src / mesh / gnunet-mesh.c
index f9cc1295c6da04dd4170f0fea558f0e161d940dd..77bb7317f906f0ad2baedbf9292eee6a1e1606a4 100644 (file)
  * @author Bartlomiej Polot
  */
 #include "platform.h"
-#include "gnunet_configuration_lib.h"
-#include "gnunet_getopt_lib.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_mesh_service.h"
-#include "gnunet_program_lib.h"
 
 
 /**
@@ -97,7 +95,7 @@ tunnels_callback (void *cls,
  * @param cls Closure.
  * @param peer Peer in the tunnel's tree.
  * @param parent Parent of the current peer. All 0 when peer is root.
- * 
+ *
  */
 static void
 tunnel_callback (void *cls,
@@ -127,6 +125,7 @@ get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 }
 
+
 /**
  * Call MESH's monitor API, get info of one tunnel.
  *
@@ -139,8 +138,13 @@ show_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct GNUNET_PeerIdentity pid;
 
   if (GNUNET_OK !=
-      GNUNET_CRYPTO_hash_from_string (tunnel_id, &pid.hashPubKey))
+      GNUNET_CRYPTO_eddsa_public_key_from_string (tunnel_id,
+                                                    strlen (tunnel_id),
+                                                    &pid.public_key))
   {
+    fprintf (stderr,
+            _("Invalid tunnel owner `%s'\n"),
+            tunnel_id);
     GNUNET_SCHEDULER_shutdown();
     return;
   }