static struct GNUNET_FS_Namespace *ns;
-static struct GNUNET_TIME_Absolute expiration;
-
static struct GNUNET_CONTAINER_MetaData *meta;
static struct GNUNET_FS_Uri *uri_this;
static struct GNUNET_FS_Uri *uri_next;
+static struct GNUNET_FS_BlockOptions bo;
+
struct PeerContext
{
stop_arm (struct PeerContext *p)
{
#if START_ARM
- if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
- if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK)
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc));
- GNUNET_OS_process_close (p->arm_proc);
- p->arm_proc = NULL;
+ if (NULL != p->arm_proc)
+ {
+ if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
+ if (GNUNET_OS_process_wait(p->arm_proc) != GNUNET_OK)
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "ARM process %u stopped\n", GNUNET_OS_process_get_pid (p->arm_proc));
+ GNUNET_OS_process_close (p->arm_proc);
+ p->arm_proc = NULL;
+ }
#endif
if (uri_this != NULL)
GNUNET_FS_uri_destroy (uri_this);
const struct GNUNET_FS_Uri *uri,
const char *emsg)
{
+
GNUNET_assert (NULL == emsg);
err = 1;
GNUNET_FS_namespace_list_updateable (ns,
"future",
meta,
uri_next,
- expiration,
- 1, 1,
+ &bo,
GNUNET_FS_PUBLISH_OPTION_NONE,
&sks_cont_next,
NULL);
ns = GNUNET_FS_namespace_create (fs,
"testNamespace");
GNUNET_assert (NULL != ns);
- expiration = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
+ bo.content_priority = 1;
+ bo.anonymity_level = 1;
+ bo.replication_level = 0;
+ bo.expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
meta = GNUNET_CONTAINER_meta_data_create ();
uri_this =
"next",
meta,
uri_this,
- expiration,
- 1, 1,
+ &bo,
GNUNET_FS_PUBLISH_OPTION_NONE,
&sks_cont_this,
NULL);