[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35558 - in gnunet/src: arm gns util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35558 - in gnunet/src: arm gns util |
Date: |
Fri, 24 Apr 2015 09:04:19 +0200 |
Author: grothoff
Date: 2015-04-24 09:04:18 +0200 (Fri, 24 Apr 2015)
New Revision: 35558
Modified:
gnunet/src/arm/test_arm_api.c
gnunet/src/arm/test_exponential_backoff.c
gnunet/src/gns/gnunet-gns-proxy.c
gnunet/src/util/program.c
Log:
move ARM/config logic to util/ where it doesn't need to cast away a 'const' and
is _slightly_ less likely to be forgotten, also add big fat comment to
hopefully clarify why it is there
Modified: gnunet/src/arm/test_arm_api.c
===================================================================
--- gnunet/src/arm/test_arm_api.c 2015-04-24 06:47:07 UTC (rev 35557)
+++ gnunet/src/arm/test_arm_api.c 2015-04-24 07:04:18 UTC (rev 35558)
@@ -185,22 +185,7 @@
task (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- char *armconfig;
cfg = c;
- if (NULL != cfgfile)
- {
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg,
- "arm", "CONFIG",
- &armconfig))
- {
- GNUNET_CONFIGURATION_set_value_string ((struct
GNUNET_CONFIGURATION_Handle
- *) cfg, "arm", "CONFIG",
- cfgfile);
- }
- else
- GNUNET_free (armconfig);
- }
arm = GNUNET_ARM_connect (cfg, &arm_conn, NULL);
if (NULL == arm)
return;
Modified: gnunet/src/arm/test_exponential_backoff.c
===================================================================
--- gnunet/src/arm/test_exponential_backoff.c 2015-04-24 06:47:07 UTC (rev
35557)
+++ gnunet/src/arm/test_exponential_backoff.c 2015-04-24 07:04:18 UTC (rev
35558)
@@ -356,21 +356,7 @@
task (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- char *armconfig;
cfg = c;
- if (NULL != cfgfile)
- {
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "arm",
- "CONFIG", &armconfig))
- {
- GNUNET_CONFIGURATION_set_value_string ((struct
GNUNET_CONFIGURATION_Handle
- *) cfg, "arm", "CONFIG",
- cfgfile);
- }
- else
- GNUNET_free (armconfig);
- }
-
arm = GNUNET_ARM_connect (cfg, NULL, NULL);
if (NULL != arm)
{
Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c 2015-04-24 06:47:07 UTC (rev 35557)
+++ gnunet/src/gns/gnunet-gns-proxy.c 2015-04-24 07:04:18 UTC (rev 35558)
@@ -522,7 +522,7 @@
* HTTP request headers for the curl request.
*/
struct curl_slist *headers;
-
+
/**
* DNS->IP mappings resolved through GNS
*/
@@ -1032,7 +1032,7 @@
GNUNET_free (cors_hdr);
}
/* force connection to be closed after each request, as we
- do not support HTTP pipelining */
+ do not support HTTP pipelining (yet, FIXME!) */
GNUNET_break (MHD_YES ==
MHD_add_response_header (s5r->response,
MHD_HTTP_HEADER_CONNECTION,
Modified: gnunet/src/util/program.c
===================================================================
--- gnunet/src/util/program.c 2015-04-24 06:47:07 UTC (rev 35557)
+++ gnunet/src/util/program.c 2015-04-24 07:04:18 UTC (rev 35558)
@@ -279,6 +279,22 @@
clock_offset = skew_offset - skew_variance;
GNUNET_TIME_set_offset (clock_offset);
}
+ /* ARM needs to know which configuration file to use when starting
+ services. If we got a command-line option *and* if nothing is
+ specified in the configuration, remember the command-line option
+ in "cfg". This is typically really only having an effect if we
+ are running code in src/arm/, as obviously the rest of the code
+ has little business with ARM-specific options. */
+ if (GNUNET_YES !=
+ GNUNET_CONFIGURATION_have_value (cfg,
+ "arm",
+ "CONFIG"))
+ {
+ GNUNET_CONFIGURATION_set_value_string (cfg,
+ "arm", "CONFIG",
+ cc.cfgfile);
+ }
+
/* run */
cc.args = &argv[ret];
if (GNUNET_NO == run_without_scheduler)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35558 - in gnunet/src: arm gns util,
gnunet <=