aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_download_recursive.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-11-03 21:26:40 +0000
committerChristian Grothoff <christian@grothoff.org>2010-11-03 21:26:40 +0000
commit721e49caeea6ba5073f8bc5c6c08359295c02bb5 (patch)
treee06e80ba90af91e9452a48a7a5782913199b4877 /src/fs/test_fs_download_recursive.c
parent37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff)
downloadgnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz
gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip
original patch from Mantis 1614
Diffstat (limited to 'src/fs/test_fs_download_recursive.c')
-rw-r--r--src/fs/test_fs_download_recursive.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fs/test_fs_download_recursive.c b/src/fs/test_fs_download_recursive.c
index 20f681f11..a60a2da9a 100644
--- a/src/fs/test_fs_download_recursive.c
+++ b/src/fs/test_fs_download_recursive.c
@@ -29,7 +29,7 @@
29#include "gnunet_util.h" 29#include "gnunet_util.h"
30#include "gnunet_fsui_lib.h" 30#include "gnunet_fsui_lib.h"
31 31
32#define DEBUG_VERBOSE GNUNET_NO 32#define DEBUG_VERBOSE GNUNET_YES
33 33
34#define CHECK(a) if (!(a)) { ok = GNUNET_NO; GNUNET_GE_BREAK(ectx, 0); goto FAILURE; } 34#define CHECK(a) if (!(a)) { ok = GNUNET_NO; GNUNET_GE_BREAK(ectx, 0); goto FAILURE; }
35 35
@@ -256,7 +256,7 @@ int
256main (int argc, char *argv[]) 256main (int argc, char *argv[])
257{ 257{
258#if START_DAEMON 258#if START_DAEMON
259 pid_t daemon; 259 GNUNET_OS_Process *daemon;
260#endif 260#endif
261 int ok; 261 int ok;
262 char *fn = NULL; 262 char *fn = NULL;
@@ -284,7 +284,7 @@ main (int argc, char *argv[])
284 GNUNET_disk_directory_remove (NULL, 284 GNUNET_disk_directory_remove (NULL,
285 "/tmp/gnunet-fsui-recursive_download_test/"); 285 "/tmp/gnunet-fsui-recursive_download_test/");
286 daemon = GNUNET_daemon_start (NULL, cfg, "peer.conf", GNUNET_NO); 286 daemon = GNUNET_daemon_start (NULL, cfg, "peer.conf", GNUNET_NO);
287 GNUNET_GE_ASSERT (NULL, daemon > 0); 287 GNUNET_GE_ASSERT (NULL, daemon != NULL);
288 CHECK (GNUNET_OK == 288 CHECK (GNUNET_OK ==
289 GNUNET_wait_for_daemon_running (NULL, cfg, 289 GNUNET_wait_for_daemon_running (NULL, cfg,
290 30 * GNUNET_CRON_SECONDS)); 290 30 * GNUNET_CRON_SECONDS));
@@ -372,6 +372,8 @@ FAILURE:
372 372
373#if START_DAEMON 373#if START_DAEMON
374 GNUNET_GE_BREAK (NULL, GNUNET_OK == GNUNET_daemon_stop (NULL, daemon)); 374 GNUNET_GE_BREAK (NULL, GNUNET_OK == GNUNET_daemon_stop (NULL, daemon));
375 GNUNET_OS_process_close (daemon);
376 daemon = NULL;
375#endif 377#endif
376 GNUNET_GC_free (cfg); 378 GNUNET_GC_free (cfg);
377 return (ok == GNUNET_YES) ? 0 : 1; 379 return (ok == GNUNET_YES) ? 0 : 1;