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;
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)
{
* HTTP request headers for the curl request.
*/
struct curl_slist *headers;
-
+
/**
* DNS->IP mappings resolved through GNS
*/
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,
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)