GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
#include "gnunet_util.h"
#include "gnunet_fsui_lib.h"
-#define DEBUG_VERBOSE GNUNET_NO
+#define DEBUG_VERBOSE GNUNET_YES
#define CHECK(a) if (!(a)) { ok = GNUNET_NO; GNUNET_GE_BREAK(ectx, 0); goto FAILURE; }
static struct GNUNET_GE_Context *ectx;
-volatile int download_done;
+static int download_done;
static char *
makeName (unsigned int i)
}
-static volatile enum GNUNET_FSUI_EventType lastEvent;
-static volatile enum GNUNET_FSUI_EventType waitForEvent;
+static enum GNUNET_FSUI_EventType lastEvent;
+static enum GNUNET_FSUI_EventType waitForEvent;
static struct GNUNET_FSUI_Context *ctx;
static struct GNUNET_ECRS_URI *upURI;
static struct GNUNET_FSUI_DownloadList *download;
main (int argc, char *argv[])
{
#if START_DAEMON
- pid_t daemon;
+ struct GNUNET_OS_Process *daemon;
#endif
int ok;
char *fn = NULL;
GNUNET_disk_directory_remove (NULL,
"/tmp/gnunet-fsui-recursive_download_test/");
daemon = GNUNET_daemon_start (NULL, cfg, "peer.conf", GNUNET_NO);
- GNUNET_GE_ASSERT (NULL, daemon > 0);
+ GNUNET_GE_ASSERT (NULL, daemon != NULL);
CHECK (GNUNET_OK ==
GNUNET_wait_for_daemon_running (NULL, cfg,
30 * GNUNET_CRON_SECONDS));
#if START_DAEMON
GNUNET_GE_BREAK (NULL, GNUNET_OK == GNUNET_daemon_stop (NULL, daemon));
+ GNUNET_OS_process_close (daemon);
+ daemon = NULL;
#endif
GNUNET_GC_free (cfg);
return (ok == GNUNET_YES) ? 0 : 1;