does not terminate on invalid uri
[oweals/gnunet.git] / src / peerinfo-tool / gnunet-peerinfo.c
index 809b2a5929b2addb5a675d269c28e7a9f61fa6b5..0cb434d8913ff16be8f516ff120fc9d99df2b0e9 100644 (file)
@@ -432,7 +432,7 @@ add_continuation (void *cls,
 static int
 parse_hello_uri (const char *put_uri)
 {
-  struct GNUNET_HELLO_Message *hello;
+  struct GNUNET_HELLO_Message *hello = NULL;
 
   int ret = GNUNET_HELLO_parse_uri(put_uri, &my_public_key, &hello, &GPI_plugins_find);
 
@@ -594,9 +594,12 @@ state_machine (void *cls,
   {
     GPI_plugins_load (cfg);
     if (GNUNET_SYSERR == parse_hello_uri (put_uri))
+    {
       fprintf (stderr,
               _("Invalid URI `%s'\n"),
-              put_uri);    
+              put_uri);
+      GNUNET_SCHEDULER_shutdown ();
+    }
     GNUNET_free (put_uri);
     put_uri = NULL;
     return;