From d6f6be87c98362faa95a84d27a65b79694369fee Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 30 Jan 2012 13:26:11 +0000 Subject: [PATCH] -trying to fix double-start issue on sparc --- src/arm/gnunet-service-arm.c | 10 +++++++++- src/util/configuration.c | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 88fabef2f..064cb9777 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c @@ -308,6 +308,7 @@ start_process (struct ServiceList *sl) "Starting service `%s' using binary `%s' and configuration `%s'\n", sl->name, sl->binary, sl->config); #endif + GNUNET_assert (NULL == sl->proc); if (GNUNET_YES == use_debug) sl->proc = do_start_process (lsocks, loprefix, sl->binary, "-c", sl->config, "-L", @@ -407,7 +408,7 @@ find_service (const char *name) sl = running_head; while (sl != NULL) { - if (0 == strcmp (sl->name, name)) + if (0 == strcasecmp (sl->name, name)) return sl; sl = sl->next; } @@ -1041,6 +1042,13 @@ setup_service (void *cls, const char *section) /* not a service section */ return; } + sl = find_service (section); + if (NULL != sl) + { + /* got the same section twice!? */ + GNUNET_break (0); + return; + } config = NULL; if ((GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, section, "CONFIG", diff --git a/src/util/configuration.c b/src/util/configuration.c index 50f32e286..f24b2c2c6 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -407,7 +407,7 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct struct ConfigEntry *epos; spos = cfg->sections; - while ((spos != NULL) && (0 != strcmp (spos->name, section))) + while ((spos != NULL) && (0 != strcasecmp (spos->name, section))) spos = spos->next; if (spos == NULL) @@ -465,7 +465,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, spos = cfg->sections; while (spos != NULL) { - if (0 == strcmp (section, spos->name)) + if (0 == strcasecmp (section, spos->name)) { if (prev == NULL) cfg->sections = spos->next; -- 2.25.1