From 4eee0a0abf0bf83569d95c23c67907db8b832c67 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 9 Jun 2012 15:55:48 +0000 Subject: [PATCH] -use human-readable error message --- src/util/service.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/util/service.c b/src/util/service.c index 6a6fb6cc9..2e75125ce 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -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, -- 2.25.1