From b1685ed04171415c242ae8e39061e899a8c6f2f5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Nov 2009 08:32:27 +0000 Subject: [PATCH] bugfix --- src/util/Makefile.am | 1 + src/util/program.c | 24 ++++++++++++++++++++++++ src/util/pseudonym.c | 4 +++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 47744001b..c85a2cd75 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -362,6 +362,7 @@ perf_crypto_hash_LDADD = \ EXTRA_DIST = \ + program_lib_argz.c \ test_configuration_data.conf \ test_container_meta_data_image.jpg \ test_program_data.conf \ diff --git a/src/util/program.c b/src/util/program.c index 695a6f9bc..f74da8c7f 100644 --- a/src/util/program.c +++ b/src/util/program.c @@ -35,6 +35,12 @@ #include "gnunet_scheduler_lib.h" #include +#if HAVE_ARGZ_H +#include +#else +#include "program_lib_argz.c" +#endif + /** * Context for the command. */ @@ -139,7 +145,25 @@ GNUNET_PROGRAM_run (int argc, GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION) }; struct GNUNET_GETOPT_CommandLineOption *allopts; + const char *gargs; + gargs = getenv ("GNUNET_ARGS"); + if (gargs != NULL) + { + char *gargz; + size_t gargl; + char **gargv; + int i; + + argz_create_sep (gargs, ' ', &gargz, &gargl); + for (i=0;icfg, &id, &meta, &rating, &str)) return GNUNET_OK; /* ignore entry */ + GNUNET_free_non_null (str); if (c->iterator != NULL) ret = c->iterator (c->closure, &id, meta, rating); GNUNET_CONTAINER_meta_data_destroy (meta); -- 2.25.1