p->cfg = GNUNET_CONFIGURATION_create ();
#if START_ARM
p->arm_proc =
- GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+ GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
"gnunet-service-arm",
#if VERBOSE
"-L", "DEBUG",
static void
do_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- fprintf (stderr, "Operation timed out\n");
+ FPRINTF (stderr, "%s", "Operation timed out\n");
kill_task = GNUNET_SCHEDULER_NO_TASK;
abort_sks_search_task (NULL, tc);
abort_ksk_search_task (NULL, tc);
if (!GNUNET_FS_uri_test_equal
(sks_expect_uri, event->value.search.specifics.result.uri))
{
- fprintf (stderr, "Wrong result for sks search!\n");
+ FPRINTF (stderr, "%s", "Wrong result for sks search!\n");
err = 1;
}
/* give system 1ms to initiate update search! */
if (!GNUNET_FS_uri_test_equal
(ksk_expect_uri, event->value.search.specifics.result.uri))
{
- fprintf (stderr, "Wrong result for ksk search!\n");
+ FPRINTF (stderr, "%s", "Wrong result for ksk search!\n");
err = 1;
}
GNUNET_SCHEDULER_add_continuation (&abort_ksk_search_task, NULL,
}
else
{
- fprintf (stderr, "Unexpected search result received!\n");
+ FPRINTF (stderr, "%s", "Unexpected search result received!\n");
GNUNET_break (0);
}
break;
case GNUNET_FS_STATUS_SEARCH_ERROR:
- fprintf (stderr, "Error searching file: %s\n",
+ FPRINTF (stderr, "Error searching file: %s\n",
event->value.search.specifics.error.message);
if (sks_search == event->value.search.sc)
GNUNET_SCHEDULER_add_continuation (&abort_sks_search_task, NULL,
case GNUNET_FS_STATUS_SEARCH_STOPPED:
return NULL;
default:
- fprintf (stderr, "Unexpected event: %d\n", event->status);
+ FPRINTF (stderr, "Unexpected event: %d\n", event->status);
break;
}
return event->value.search.cctx;
if (NULL != emsg)
{
- fprintf (stderr, "Error publishing: %s\n", emsg);
+ FPRINTF (stderr, "Error publishing: %s\n", emsg);
err = 1;
GNUNET_FS_stop (fs);
return;
GNUNET_CRYPTO_hash_to_enc (&nsid, &enc);
GNUNET_snprintf (sbuf, sizeof (sbuf), "gnunet://fs/sks/%s/this", &enc);
sks_uri = GNUNET_FS_uri_parse (sbuf, &msg);
- if (msg != NULL)
+ if (NULL == sks_uri)
{
- fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg);
+ FPRINTF (stderr, "failed to parse URI `%s': %s\n", sbuf, msg);
err = 1;
GNUNET_FS_stop (fs);
- GNUNET_free (msg);
+ GNUNET_free_non_null (msg);
return;
}
ksk_search =
if (NULL != emsg)
{
- fprintf (stderr, "Error publishing: %s\n", emsg);
+ FPRINTF (stderr, "Error publishing: %s\n", emsg);
err = 1;
GNUNET_FS_stop (fs);
return;
GNUNET_FS_namespace_list (fs, &ns_iterator, &ok);
if (GNUNET_NO == ok)
{
- fprintf (stderr, "namespace_list failed to find namespace!\n");
+ FPRINTF (stderr, "%s", "namespace_list failed to find namespace!\n");
GNUNET_FS_namespace_delete (ns, GNUNET_YES);
GNUNET_FS_stop (fs);
err = 1;
stop_arm (&p1);
if (GNUNET_YES != update_started)
{
- fprintf (stderr, "Update search never started!\n");
+ FPRINTF (stderr, "%s", "Update search never started!\n");
err = 1;
}
GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-namespace/");