-use human-readable error message
authorChristian Grothoff <christian@grothoff.org>
Sat, 9 Jun 2012 15:55:48 +0000 (15:55 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 9 Jun 2012 15:55:48 +0000 (15:55 +0000)
src/util/service.c

index 6a6fb6cc9a71ccd07577c3af57dff1f504fc6344..2e75125cedfb4b85816bd5b07671e2db07069c79 100644 (file)
@@ -931,9 +931,14 @@ GNUNET_SERVICE_get_server_addresses (const char *service_name,
   port = 0;
   if (GNUNET_CONFIGURATION_have_value (cfg, service_name, "PORT"))
   {
-    GNUNET_break (GNUNET_OK ==
-                  GNUNET_CONFIGURATION_get_value_number (cfg, service_name,
-                                                         "PORT", &port));
+    if (GNUNET_OK !=
+       GNUNET_CONFIGURATION_get_value_number (cfg, service_name,
+                                              "PORT", &port))
+    {
+      LOG (GNUNET_ERROR_TYPE_ERROR,
+           _("Require valid port number for service `%s' in configuration!\n"),
+           service_name);
+    }
     if (port > 65535)
     {
       LOG (GNUNET_ERROR_TYPE_ERROR,